Fix bug in here-doc parsing
When a here-doc contains an empty line, any whitespace it contains should be ignored for purposes of determining the amount of leading whitespace to trim from each line.
This commit is contained in:
@@ -125,6 +125,7 @@ module.exports = class CommandParserVersionBase
|
||||
|
||||
shortestIndent = Number.MAX_VALUE
|
||||
for hereDocLine in hereDocLines
|
||||
continue if hereDocLine.trim().length is 0
|
||||
shortestIndent = Math.min hereDocLine.match(/( *).*/)[1].length, shortestIndent
|
||||
|
||||
for i in [0...hereDocLines.length]
|
||||
|
||||
Reference in New Issue
Block a user