Skip to content

Commit f51895b

Browse files
committed
Fix potentially-exponential regular expression in use-strict-scanning
1 parent 9a2e9b6 commit f51895b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

acorn/src/parseutil.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const pp = Parser.prototype
66

77
// ## Parser utilities
88

9-
const literal = /^(?:'((?:\\.|[^'])*?)'|"((?:\\.|[^"])*?)")/
9+
const literal = /^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/
1010
pp.strictDirective = function(start) {
1111
for (;;) {
1212
// Try to find string literal.

0 commit comments

Comments
 (0)