Closed eemeli closed 4 years ago
I agree that the 2
should be removed. The out.yaml was generated by libyaml, so it seems libyaml is doing the "wrong" thing here.
It seems to happen only if the first line is empty.
@ingydotnet @flyx any idea why libyaml is doing this?
I also agree that logically, it should be a 3
, although that doesn't make much sense from a user perspective.
Thanks! merged to release branch
The
2
indentation indicator is unnecessary, and therefore against the guideline given at least in the 1.2 version of the spec:Furthermore, the
2
in this case doesn't even match the actual indentation of the contents. As "Document nodes are indented as if they have a parent indented at -1 spaces", and the example uses two spaces for indentation, the indicator here would need to be3
for the in.yaml and out.yaml contents to match.