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