3
0
mirror of https://github.com/larvit/adf-codec.git synced 2026-11-20 15:15:44 +01:00

Build a hardBreak carrying no marks where a mark spelling spans a line break, in every reader

This commit is contained in:
2026-10-09 10:54:56 +02:00
committed by Lillem4n
parent 78655bcdc0
commit 3ff5c95f4c
9 changed files with 50 additions and 44 deletions
+1
View File
@@ -221,6 +221,7 @@ function nodePath(context: InlineContext, index: number): ConvertErrorPath {
function carries(node: AdfNode, carried: ReadonlySet<number>, index: number): boolean {
if (carried.has(index)) return true
if (node.type === 'text') return !isSpellableText(node) || typeof node.text !== 'string' || node.text === ''
if (node.type === 'hardBreak') return nodeMarks(node).length > 0
const model = inlineNodeModel(node.type)
if (model === undefined) return true
const slot = model.textAttribute === undefined ? undefined : nodeAttrs(node)[model.textAttribute]