Reword the isBareText and adfNodes comments
This commit is contained in:
+1
-1
@@ -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
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user