fixing Issue #545 ... whitespace-only heredocs.
This commit is contained in:
parent
7142131f3d
commit
12493779b9
|
@ -143,7 +143,7 @@
|
|||
return false;
|
||||
}
|
||||
quote = match[1].substr(0, 1);
|
||||
doc = this.sanitizeHeredoc(match[2] || match[4], {
|
||||
doc = this.sanitizeHeredoc(match[2] || match[4] || '', {
|
||||
quote: quote
|
||||
});
|
||||
this.interpolateString(quote + doc + quote, {
|
||||
|
|
|
@ -130,7 +130,7 @@ exports.Lexer = class Lexer
|
|||
heredocToken: ->
|
||||
return false unless match = @chunk.match(HEREDOC)
|
||||
quote = match[1].substr 0, 1
|
||||
doc = @sanitizeHeredoc match[2] or match[4], {quote}
|
||||
doc = @sanitizeHeredoc match[2] or match[4] or '', {quote}
|
||||
@interpolateString quote + doc + quote, heredoc: yes
|
||||
@line += count match[1], "\n"
|
||||
@i += match[1].length
|
||||
|
|
Loading…
Reference in New Issue