You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Files output by the tool do not maintain YAML comments.
One consequence is that trying to mask jinja code using comments will result in the jinja being stripped from the resulting file. As the tool will not parse files with naked jinja using comments would be the only good way to preserve it.
something like this should be allowed:
foo:
# {%- if grains['envtype'] == 'dev' %}
bar: |
foo
# {%- else %}
bar
# {%- endif %}
Currently this would be stripped down to something like:
foo:
bar: |
foo
bar
The go-yaml.v3 module can support comments, but it isn't clear how. There is also the Mozilla yaml fork that has an alternative approach which might be useful:
Files output by the tool do not maintain YAML comments.
One consequence is that trying to mask jinja code using comments will result in the jinja being stripped from the resulting file. As the tool will not parse files with naked jinja using comments would be the only good way to preserve it.
something like this should be allowed:
Currently this would be stripped down to something like:
The go-yaml.v3 module can support comments, but it isn't clear how. There is also the Mozilla yaml fork that has an alternative approach which might be useful:
https://github.com/go-yaml/yaml/blob/v3/yaml.go
https://github.com/mozilla-services/yaml/blob/v2/yaml.go
The text was updated successfully, but these errors were encountered: