Skip to content

Commit

Permalink
Fix potentially-exponential regular expression in use-strict-scanning
Browse files Browse the repository at this point in the history
  • Loading branch information
marijnh committed Oct 5, 2020
1 parent 54efb62 commit 9c9142a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion acorn/src/parseutil.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const pp = Parser.prototype

// ## Parser utilities

const literal = /^(?:'((?:\\.|[^'])*?)'|"((?:\\.|[^"])*?)")/
const literal = /^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/
pp.strictDirective = function(start) {
for (;;) {
// Try to find string literal.
Expand Down

0 comments on commit 9c9142a

Please sign in to comment.