Skip to content

Commit 9c9142a

Browse files
committed
Fix potentially-exponential regular expression in use-strict-scanning
1 parent 54efb62 commit 9c9142a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

acorn/src/parseutil.js

+1-1
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)