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

Answer prose round 1: 0 🔴, 7 🟡 (0 misread); the bound test's block count is 53, comments name their referents

This commit is contained in:
2026-10-29 16:19:12 +01:00
committed by Lillem4n
parent bbd2ad9c74
commit ee95b3035f
8 changed files with 11 additions and 12 deletions
+1 -1
View File
@@ -250,7 +250,7 @@ function withoutMarks(leaves: readonly AdfNode[], runs: readonly MarkRun[]): Adf
})
}
// Every misflanked highlight drops with the first run; taking `every`, so does a later emphasis run whose drop merges no run and moves no edge.
// Every misflanked highlight drops with the first run; with `every`, so does a later emphasis run whose drop merges no run and moves no edge.
function droppedRuns(leaves: readonly AdfNode[], [first, ...others]: readonly [MarkRun, ...MarkRun[]], perPass: FallbacksPerPass): MarkRun[] {
return [first, ...others.filter((run) => nodeMarks(leaves[run.first] ?? {})[run.depth]?.type === highlight || (perPass === 'every' && dropsAlone(leaves, run)))]
}