This is incredibly bizarre. If you have a folded block scalar (denoted with >) and the first character is a [, yamlfmt becomes unstable and adds an additional newline each time the tool is run
Given the initial input of
key: >
[
This is not YAML
]
Running yamlfmt on this once yields
key: >
[
This is not YAML
]
Running it again yields
key: >
[
This is not YAML
]
and so on.
This doesn't happen if it's an unfolded scalar (i.e., if the first line of my example is key: |) and it doesn't happen for any other first lines in the string (at least, not any I tried).
I can't imagine why the parser would care at all what the contents of a string literal are, but it sure seems to.
This is incredibly bizarre. If you have a folded block scalar (denoted with
>) and the first character is a[, yamlfmt becomes unstable and adds an additional newline each time the tool is runGiven the initial input of
Running
yamlfmton this once yieldsRunning it again yields
and so on.
This doesn't happen if it's an unfolded scalar (i.e., if the first line of my example is
key: |) and it doesn't happen for any other first lines in the string (at least, not any I tried).I can't imagine why the parser would care at all what the contents of a string literal are, but it sure seems to.