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

Answer prose round 1: 0 🔴, 2 🟡 (0 misread); say what insideRun's callers rely on, delete sharedRuns's comment, clear the termination comment

This commit is contained in:
2026-11-03 21:54:29 +01:00
committed by Lillem4n
parent bcdf224e4c
commit 1409a1699a
2 changed files with 2 additions and 3 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ export function isEmphasis(mark: AdfMark): boolean {
return markSpelling(mark.type)?.kind === 'emphasis'
}
// spec/flavour.md, Marks. The writers and the portable reducer group runs alike only while both ask this.
// spec/flavour.md, Marks. The portable reducer must ask this too, or it trims edge whitespace by runs the writers do not spell.
export function insideRun({ node, outer }: RunNode, mark: AdfMark): RunNode | undefined {
const held = nodeMarks(node)[outer]
return held !== undefined && identicalMark(held, mark) ? { node, outer: outer + 1 } : undefined