Skip to content

Commit

Permalink
Don't use an /s regexp
Browse files Browse the repository at this point in the history
FIX: Fix a regression that caused Acorn to no longer run on Node versions <8.10.

Closes #1305
See #1283
  • Loading branch information
marijnh committed Jul 3, 2024
1 parent da521f6 commit c26b84a
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 = /^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/s
const literal = /^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/
pp.strictDirective = function(start) {
if (this.options.ecmaVersion < 5) return false
for (;;) {
Expand Down

0 comments on commit c26b84a

Please sign in to comment.