Open ghost opened 8 years ago
It is actually "correct". A block statement or mustache statement will "eat" a newline if it follows directly after the mustaches.
This is a default feature of the Handlebars parser. We can disable it but it is a breaking change. See https://github.com/wycats/handlebars.js/issues/1072 and https://github.com/wycats/handlebars.js/commit/ea3a5a1.
Example:
Will report a
TextNode
inside theBlockStatement
withchars: '\n'
while this should bechars: '\n\n'
. I would also accept the start location of theTextNode
to be on the new line.