Skip to content

Commit a9ab180

Browse files
committed
Fix jashkenas#4589: Unquote all interpolated strings, not just CSX ones, so that quotation marks are not unnecessarily escaped in backtick-delimited strings/template literals
1 parent a3b08e1 commit a9ab180

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/coffeescript/nodes.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/nodes.coffee

+1-1
Original file line numberDiff line numberDiff line change
@@ -3393,7 +3393,7 @@ exports.StringWithInterpolations = class StringWithInterpolations extends Base
33933393
fragments.push @makeCode '`' unless @csx
33943394
for element in elements
33953395
if element instanceof StringLiteral
3396-
element.value = element.unquote @csx
3396+
element.value = element.unquote yes
33973397
unless @csx
33983398
# Backticks and `${` inside template literals must be escaped.
33993399
element.value = element.value.replace /(\\*)(`|\$\{)/g, (match, backslashes, toBeEscaped) ->

0 commit comments

Comments
 (0)