Fix K3WX.yaml (comments in map key) bug in yaml-test-suite#18324
Fix K3WX.yaml (comments in map key) bug in yaml-test-suite#18324fisker merged 9 commits intoprettier:mainfrom
K3WX.yaml (comments in map key) bug in yaml-test-suite#18324Conversation
commit: |
✅ Deploy Preview for prettier ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Can you add a changelog, I'll take another look later. |
|
@kovsu You know what? Turns out this is not expected output. Prettier pr-18196 --parser yamlInput: {["foo"] # comment
:bar }Output: { ? ["foo"] # comment
: bar }
So the expected output should be prettier/src/language-yaml/print/mapping-item.js Lines 134 to 139 in 36042ef Can you apply? |
|
Maybe you'll be interested in fixing #10879 . Of course, in separate PR. |
Done
I will try it 😀 |
| ```yaml | ||
| # Input | ||
| {"foo": #comment | ||
| bar} |
There was a problem hiding this comment.
Ha, so we also fixed this case. Added to tests c4d4975 (#18324)
There was a problem hiding this comment.
Looks like it's a bug in parser... Shouldn't the comment belong to value?
K3WX.yaml bug in yaml-test-suiteK3WX.yaml (comments in map key) bug in yaml-test-suite

Description
Ref: #18302
Checklist
docs/directory).changelog_unreleased/*/XXXX.mdfile followingchangelog_unreleased/TEMPLATE.md.