noahmorrison / chevron

A Python implementation of mustache
MIT License
505 stars 55 forks source link

Extra newline #30

Closed LucidOne closed 6 years ago

LucidOne commented 6 years ago

test.template

This is a {{test}}.

test.yml

---
test: "failed test"
$ chevron -d test.yml test.template 
This is a new test.

$
LucidOne commented 6 years ago

Problem seems to exist in both Python 2.7.13 and Python 3.5.3 Tested from pip and git

noahmorrison commented 6 years ago

Hey there,

Chevron handles newlines correctly (and is checked by unittests) allll the way up til the actual CLI method, because it takes the output string and prints it, which adds the extra newline.

I guess I never really use the CLI so I never noticed... Thanks for finding this!

Newest version (0.12.2) should behave like you expect (already posted to pypi).

LucidOne commented 6 years ago

Thanks for the quick response!