CertainLach/jrsonnet

`--string` adds newline at end of file

Closed this issue · 1 comments

Another minor issue

When rendering files with --string or -S, jrsonnet adds a newline to the end of a file while plain jsonnet doesn't.

# output.jsonnet
function(filename) {
  [filename + '.txt']: 'This is a simple file.',
}
[I] ➜ jsonnet -A filename=jsonnet -S -m . output.jsonnet
./jsonnet.txt

[I] ➜ jrsonnet -A filename=jrsonnet -S -m . output.jsonnet
./jrsonnet.txt

[I] ➜ diff jsonnet.txt jrsonnet.txt
1c1
< This is a simple file.
\ No newline at end of file
---
> This is a simple file.

Background: I'm using jrsonnet with Docsonnet, rendering files with render(). It's very fast compared to jsonnet. 😉