Skip to content

Commit

Permalink
Fold Item nodes, not BlockSequence
Browse files Browse the repository at this point in the history
FIX: Make block sequence items, rather than the whole sequence, fold
targets.

See https://discuss.codemirror.net/t/folding-discrepancy-with-lang-yaml-blocksequence/8883
  • Loading branch information
marijnh committed Dec 10, 2024
1 parent 4746470 commit 5128820
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 Pair BlockLiteral":
"Item Pair BlockLiteral":
(node, state) => ({from: state.doc.lineAt(node.from).to, to: node.to})
})
]
Expand Down

0 comments on commit 5128820

Please sign in to comment.