JavaScript: Do not flag case-insensitive replace.

This commit is contained in:
Max Schaefer
2018-09-25 11:02:03 +01:00
parent 1ab11109f9
commit ec9a3c87a7

View File

@@ -17,9 +17,10 @@ import javascript
* `s` and nothing else.
*/
predicate matchesString(Expr e, string s) {
exists (RegExpConstant c |
matchesConstant(e.(RegExpLiteral).getRoot(), c) and
s = c.getValue()
exists (RegExpLiteral rl |
rl = e and
not rl.isIgnoreCase() and
regExpMatchesString(rl.getRoot(), s)
)
or
s = e.getStringValue()