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); reword the sweep's comments, the cost entry and item 160

This commit is contained in:
2026-10-30 01:37:27 +01:00
committed by Lillem4n
parent f151ea5c09
commit 4834e802d9
6 changed files with 26 additions and 22 deletions
+1 -1
View File
@@ -261,7 +261,7 @@ function droppedRuns(leaves: readonly AdfNode[], runs: readonly [MarkRun, ...Mar
return perPass === 'every' ? runs : runs.filter((run, index) => index === 0 || nodeMarks(leaves[run.first] ?? {})[run.depth]?.type === highlight)
}
// Dropping the run merges no runs and moves no edge, whatever else drops: at each end, the leaf beside holds no mark type the edge leaf holds inside the run's mark.
// Dropping the run merges no runs and moves no run's end, whatever else drops: at each end, the leaf outside holds no mark type the end leaf holds inside the run's mark.
function dropsAlone(leaves: readonly AdfNode[], run: MarkRun): boolean {
return endsAlone(leaves[run.first], leaves[run.first - 1], run.depth) && endsAlone(leaves[run.last], leaves[run.last + 1], run.depth)
}