Closed pksunkara closed 1 month ago
It's retained in the document that you get from parseDocument
; the formatting is not retained in the JS representation.
Oh, that makes sense. Let me see if I can use parseDocument
and fix it.
I haven't fully confirmed because I am still revamping my other logics, but it looks like the "After" version is adding spaces though.
on: [ pull_request ]
Yup, I can confirm that the spaces choice between in the square brackets in array is not being preserved.
Normalising whitespace is done intentionally; information about it is not retained in the parsed document.
In that case,
Closing, as there's nothing actionable here and the current behaviour is intentional.
Describe the bug When I am parsing a YAML and stringifying it afterward, the whitespace in an array changes.
To Reproduce
Before:
After:
Expected behaviour
The after file should be the same as before
Versions (please complete the following information):
node
: 22yaml
: 2.5.0