Skip to content

Commit a9ed331

Browse files
committed
Fix regex per suggestion
1 parent 7b6773c commit a9ed331

File tree

1 file changed

+4
-1
lines changed
  • javascript/ql/src/experimental/semmle/javascript

1 file changed

+4
-1
lines changed

javascript/ql/src/experimental/semmle/javascript/Actions.qll

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,10 @@ module Actions {
307307
// not just the last (greedy match) or first (reluctant match).
308308
// TODO: This only handles expression strings that refer to contexts.
309309
// It does not handle operators within the expression.
310-
result = this.getValue().regexpFind("[A-Za-z0-9_\\.\\-]+(?=\\s*\\}\\})", _, _)
310+
result =
311+
this.getValue()
312+
.regexpFind("\\$\\{\\{\\s*[A-Za-z0-9_\\.\\-]+\\s*\\}\\}", _, _)
313+
.regexpCapture("\\$\\{\\{\\s*([A-Za-z0-9_\\.\\-]+)\\s*\\}\\}", 1)
311314
}
312315
}
313316
}

0 commit comments

Comments
 (0)