From 811d19ab76eeba5146393167b53c48e7a0b70f8d Mon Sep 17 00:00:00 2001 From: Marijn Haverbeke Date: Thu, 12 Mar 2015 22:26:31 +0100 Subject: [PATCH] Allow any number of digits when killing \u{} sequences in regexps --- acorn.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acorn.js b/acorn.js index 24740de6b5..3156eaf4c6 100644 --- a/acorn.js +++ b/acorn.js @@ -1082,7 +1082,7 @@ // ASCII symbol to avoid throwing on regular expressions that // are only valid in combination with the `/u` flag. tmp = tmp - .replace(/\\u\{([0-9a-fA-F]{5,6})\}/g, "x") + .replace(/\\u\{([0-9a-fA-F]+)\}/g, "x") .replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "x"); } }