mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-19 03:44:23 -05:00
fixing heredocs with multiple double quotes (broken regex from the Ruby translation), with tests.
This commit is contained in:
@@ -159,7 +159,7 @@ exports.Lexer: class Lexer
|
||||
indent: (doc.match(HEREDOC_INDENT) or ['']).sort()[0]
|
||||
doc: doc.replace(new RegExp("^" + indent, 'gm'), '')
|
||||
.replace(MULTILINER, "\\n")
|
||||
.replace('"', '\\"')
|
||||
.replace(/"/g, '\\"')
|
||||
@token 'STRING', '"' + doc + '"'
|
||||
@line += @count match[1], "\n"
|
||||
@i += match[1].length
|
||||
|
||||
Reference in New Issue
Block a user