We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug The library adds an additional newline after an empty value and a newline
To Reproduce
import { parseDocument } from 'yaml'; import { createPatch } from 'diff'; const yaml = ` map: item: anothermap: anotheritem: `; const document = parseDocument(yaml); const result = document.toString(); const patch = createPatch('output', yaml, result); console.log(patch);
Output:
Index: output =================================================================== --- output +++ output @@ -1,7 +1,8 @@ - map: item: + anothermap: anotheritem: +
Expected behaviour Expected output:
Index: output =================================================================== --- output +++ output
Versions (please complete the following information):
yaml
The text was updated successfully, but these errors were encountered:
Yup, that's a bug. The empty value ends up with a spaceBefore: true, even though that should probably end up on the subsequent anothermap key.
spaceBefore: true
anothermap
PR welcome, not sure when I might get to this myself.
Sorry, something went wrong.
although this is very tricky, can we fix by removing triple newlines? 😁
No branches or pull requests
Describe the bug
The library adds an additional newline after an empty value and a newline
To Reproduce
Output:
Expected behaviour
Expected output:
Versions (please complete the following information):
yaml
: 2.2.2The text was updated successfully, but these errors were encountered: