Yaml library drops comments when round tripping
Open
enhancement
- Dominant language
- TypeScript
- Stars
- 3.6k
- Forks
- 681
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
If I parse a yaml file, edit it then save it back, it drops all comments.
**Steps to Reproduce**
```ts
import {
parse,
stringify,
} from "https://deno.land/std@0.182.0/yaml/mod.ts";
const result = stringify(parse(`
# comment
name: example
`));
console.log(stringify(result)) // name: example
```
**Expected behavior**
I expect all code comments to be preserved.
**Environment**
```
deno 1.31.3 (release, x86_64-apple-darwin)
v8 11.0.226.19
typescript 4.9.4
```
- std version: `0.182.0`
Contributor guide
Assessment
This issue has not been assessed yet.