Reword the isBareText and adfNodes comments

This commit is contained in:
2026-10-03 17:52:56 +02:00
parent ee9a7e7562
commit 7b38eba29e
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -64,7 +64,7 @@ export function emptyKeys(held: { attrs?: AdfAttributes; content?: AdfNode[]; ma
return keys
}
// A text node holding no attrs or content key and no empty marks: a format spells it as text, where anything more rides a carry.
// A format spells this node as text; anything more rides a carry, save content, which is refused.
export function isBareText(node: AdfNode): boolean {
return node.type === 'text' && node.attrs === undefined && node.content === undefined && node.marks?.length !== 0
}
+1 -1
View File
@@ -327,7 +327,7 @@ function isTextBreak(item: Inline): item is TextBreak {
return 'kind' in item && item.kind === 'textBreak'
}
// The nodes the items hold, own-marks ones unwrapped and text breaks dropped.
// The nodes the items hold, with text breaks dropped.
function adfNodes(items: readonly Inline[]): AdfNode[] {
const nodes: AdfNode[] = []
for (const item of items) {