colis-anr / morbig

A static parser for POSIX Shell
Other
190 stars 8 forks source link

Strip last newline from here documents? #175

Open Niols opened 1 year ago

Niols commented 1 year ago

Currently, on here documents, Morbig systematically produces a word that ends with a literal containing a newline character. One could however argue that this newline, because it is systematically necessary, does not belong to the content of the here-document but to the syntax of here-documents themselves. I think we should strip it as part of Morbig's parsing.

yurug commented 1 year ago

That makes sense to me too.