Infinite adding EOL
Open
yaml_v3_problem
- Dominant language
- Go
- Stars
- 1.8k
- Forks
- 75
- PR merge metrics
- No merged PRs in 30d
Description
Hi!
I have a YAML file embedding a Jinja template (cames from Ansible):
```yaml
list: >-
[
{% for host in servers %}
{"ip": "{{ host }}"},
{% endfor %}
]
```
Using the dry flag, everything seems ok:
```bash
$ yamlfmt -dry test.yaml
2024/04/23 13:49:10 No files will be changed.
```
Without the dry flag a new line is added:
```bash
$ yamlfmt test.yaml
$ cat test.yaml
list: >-
[
{% for host in servers %}
{"ip": "{{ host }}"},
{% endfor %}
]
```
Every time I run `yamlfmt` a new line is added.
Contributor guide
Assessment
This issue has not been assessed yet.