Skip to content

Commit

Permalink
Make pairs, rather than block mappings, foldable
Browse files Browse the repository at this point in the history
FIX: Make block mapping entries, rather than the entire mapping, foldable.

See https://discuss.codemirror.net/t/folding-issues-with-lang-yaml-and-or-lezer-yaml-blockmapping/8111
  • Loading branch information
marijnh committed Apr 12, 2024
1 parent 0dc0866 commit 90885ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/yaml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const yamlLanguage = LRLanguage.define({
}),
foldNodeProp.add({
"FlowMapping FlowSequence": foldInside,
"BlockSequence BlockMapping BlockLiteral":
"BlockSequence Pair BlockLiteral":
(node, state) => ({from: state.doc.lineAt(node.from).to, to: node.to})
})
]
Expand Down

0 comments on commit 90885ba

Please sign in to comment.