From 7b38eba29e108f6758e634a4fc35da2f5d785bc8 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Sat, 3 Oct 2026 17:52:56 +0200 Subject: [PATCH] Reword the isBareText and adfNodes comments --- src/adf/document.ts | 2 +- src/markdown/parse/inline-content.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/adf/document.ts b/src/adf/document.ts index cd5d0e6..772dd34 100644 --- a/src/adf/document.ts +++ b/src/adf/document.ts @@ -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 } diff --git a/src/markdown/parse/inline-content.ts b/src/markdown/parse/inline-content.ts index d02f699..6ca3bba 100644 --- a/src/markdown/parse/inline-content.ts +++ b/src/markdown/parse/inline-content.ts @@ -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) {