fix: Missing trailing newline when using both --multi and --string options#819
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
Please note that this is a breaking change. And at least one other implementation copies the behaviour: databricks/sjsonnet FWIW, cpp-jsonnet does output the newline. Speaking as a heavy user of jsonnet and these flags, I'd welcome another flag that would turn the extra newline on and off. |
|
Thanks for the contribution, this seems like a worthwhile improvement.
Yeah, and it's kind of painful due to how long the discrepancy has existed. I'm seeking opinions on #518 (comment) |
|
I've rebased this and will include it in #843. |
05c7b8f to
2946b6c
Compare
Problem
when using both
--multiand--stringoptions, the output does not have a trailing newline.The output has trailing newline when
--multior--stringoption--multioption--stringoptionReproducible with:
xxdshows that the outfile ends with 0x78 or thexcharacter.Expected:
xxdshows that the outfile ends with 0x0a which is the newline/line-feed (LF) character.Closes #518