3
0
mirror of https://github.com/larvit/adf-codec.git synced 2026-11-21 07:32:58 +01:00

Keep the inline carry's path as it was

This commit is contained in:
2026-11-17 03:12:17 +01:00
committed by Lillem4n
parent 43ec9f1db8
commit 8ae1b21508
4 changed files with 8 additions and 19 deletions
+1 -1
View File
@@ -34,7 +34,7 @@ export function inlineLine(nodes: readonly AdfNode[], path: ConvertErrorPath, in
const after = following?.marks.length === 0 ? following.spelled?.text : undefined
const written = groupSpelling(atoms.slice(first, last + 1), lastCharacter(line), after === undefined ? undefined : firstCharacter(after))
if (written === undefined) {
const carry = inlineCarry(nodes.slice(first, last + 1), path, first)
const carry = inlineCarry(nodes.slice(first, last + 1), [...path, 'content', first])
if (!carry.ok) return carry
line += carry.value
carried = true