Keep format knowledge out of mergeAdjacentText's comment

This commit is contained in:
2026-10-03 14:46:29 +02:00
parent bba2fa409e
commit d7ba8e6aae
+1 -1
View File
@@ -77,7 +77,7 @@ export function identicalMarks(left: readonly AdfMark[], right: readonly AdfMark
return marksKey(left) === marksKey(right) return marksKey(left) === marksKey(right)
} }
// `joins` is the caller's: a reader joins what CommonMark reads as one, editor-normal ADF what the editor would. // Callers say when two nodes join.
export function mergeAdjacentText(nodes: readonly AdfNode[], joins: (previous: AdfNode, node: AdfNode) => boolean): AdfNode[] { export function mergeAdjacentText(nodes: readonly AdfNode[], joins: (previous: AdfNode, node: AdfNode) => boolean): AdfNode[] {
const merged: AdfNode[] = [] const merged: AdfNode[] = []
for (const node of nodes) { for (const node of nodes) {