Skip to content

Commit d7a96d6

Browse files
committed
simplify implementation of getDelimiterMatchingRegexp
1 parent f0a0f41 commit d7a96d6

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

javascript/ql/src/semmle/javascript/frameworks/Templating.qll

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@ module Templating {
3636
* of the known template delimiters identified by `getADelimiter()`,
3737
* storing it in its first (and only) capture group.
3838
*/
39-
string getDelimiterMatchingRegexp() {
40-
result = "(?s).*(" + concat("\\Q" + getADelimiter() + "\\E", "|") + ").*"
41-
}
39+
string getDelimiterMatchingRegexp() { result = getDelimiterMatchingRegexpWithPrefix(".*") }
4240

4341
/**
4442
* Gets a regular expression that matches a string containing one

0 commit comments

Comments
 (0)