Commit a0f4706e authored by arv's avatar arv Committed by Commit bot

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}
parent 6e6a1c8a
...@@ -241,7 +241,7 @@ class JavaScriptMinifier(object): ...@@ -241,7 +241,7 @@ class JavaScriptMinifier(object):
# A regexp that matches a literal string surrounded by 'single quotes'. # A regexp that matches a literal string surrounded by 'single quotes'.
single_quoted_string = r"'(?:[^'\\]|\\.)*'" single_quoted_string = r"'(?:[^'\\]|\\.)*'"
# A regexp that matches a template string # A regexp that matches a template string
template_string = r"`(?:[^'\\]|\\.)*`" template_string = r"`(?:[^`\\]|\\.)*`"
# A regexp that matches a regexp literal surrounded by /slashes/. # 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 # 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. # syntax error and it's probably just two unrelated slashes.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment