-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Open
Labels
Description
What version of Bun is running?
1.3.5+1e86cebd7
What platform is your computer?
Microsoft Windows NT 10.0.26100.0 x64
What steps can reproduce the bug?
Bun splits the output into two objects when unquoted --- is present regardless of position.
const text = `
name: some-text---
description: Lorem ipsum dolor sit amet, consectetur adipiscing elit.
`
let parsed = Bun.YAML.parse(text);
console.log(parsed);What is the expected behavior?
--- that is part of a scalar value should not be treated as a break.
js-yaml parses it correctly and outputs:
{
name: "some-text---",
description: "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
}What do you see instead?
The Bun.YAML parser outputs:
[
{
name: "some-text",
}, {
description: "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
}
]Additional information
No response
coderabbitai