jsmin.py: Fix issue with escaping of back ticks
The escaping of back ticks in template strings was incorrect BUG=v8:4240 LOG=N TBR=yangguo@chromium.org Review URL: https://codereview.chromium.org/1209713003 Cr-Commit-Position: refs/heads/master@{#29271}
This commit is contained in:
parent
6e6a1c8aee
commit
a0f4706e5e
@ -241,7 +241,7 @@ class JavaScriptMinifier(object):
|
||||
# A regexp that matches a literal string surrounded by 'single quotes'.
|
||||
single_quoted_string = r"'(?:[^'\\]|\\.)*'"
|
||||
# A regexp that matches a template string
|
||||
template_string = r"`(?:[^'\\]|\\.)*`"
|
||||
template_string = r"`(?:[^`\\]|\\.)*`"
|
||||
# A regexp that matches a regexp literal surrounded by /slashes/.
|
||||
# Don't allow a regexp to have a ) before the first ( since that's a
|
||||
# syntax error and it's probably just two unrelated slashes.
|
||||
|
Loading…
Reference in New Issue
Block a user