In YAML, indentation is critical. When wrapping a long line that occurs after a hyphen, e.g.,:
- my very very very very very very very very very very very very very very very very very very very very very long item
The output is
- my very very very very very very very very very very very very very very very very
very very very very very long item
However, this is no longer valid syntax, as wrapped lines must be indented an additional two spaces from the hyphen (so that they line up with the start of the text on the line with the hyphen). The correct indentation would be:
- my very very very very very very very very very very very very very very very very
very very very very very long item
Would it be possible for rewrap to insert the additional two spaces (or whatever the file’s indentation is) when wrapping in a YAML file?
In YAML, indentation is critical. When wrapping a long line that occurs after a hyphen, e.g.,:
The output is
However, this is no longer valid syntax, as wrapped lines must be indented an additional two spaces from the hyphen (so that they line up with the start of the text on the line with the hyphen). The correct indentation would be:
Would it be possible for rewrap to insert the additional two spaces (or whatever the file’s indentation is) when wrapping in a YAML file?