-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Infinite adding EOL #169
Comments
Hi @dainok, thanks for opening an issue! I am able to reproduce the consistently adding a newline behaviour, however when I run
So I'm not sure what is causing the difference between our systems unfortunately... I did discover something while tinkering though. If I set the
(In my intermediate dev version I have a bug that I'm about to fix where the confirmation message isn't printed when there are no diffs, working on it). So if you are okay with that setting, perhaps that will work as a workaround for now. I notice the log format on |
Hi @braydonk thank you for your attention. I update to $ yamlfmt -dry test.yaml
2024/05/03 15:12:20 test.yaml:
list: >- list: >-
[ [
+
{% for host in servers %} {% for host in servers %}
{"ip": "{{ host }}"}, {"ip": "{{ host }}"},
{% endfor %} {% endfor %}
] ] To me |
Awesome, thank you for re-verifying! I will leave this issue open to keep the constant newline bug around, but similar to other bugs that live in the yaml parsing I won't be able to easily address it. |
Sure, I totally understand. Thank you again! |
Hi!
I have a YAML file embedding a Jinja template (cames from Ansible):
Using the dry flag, everything seems ok:
Without the dry flag a new line is added:
Every time I run
yamlfmt
a new line is added.The text was updated successfully, but these errors were encountered: