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

Move the emphasis sweep into unspellable-runs.ts with named standings, derive its rule in docs/decisions.md, and close item 160

This commit is contained in:
2026-10-30 22:11:47 +01:00
committed by Lillem4n
parent 9bedc7bae4
commit 42fc6d97fb
7 changed files with 300 additions and 257 deletions
+1 -1
View File
@@ -255,7 +255,7 @@ function withoutEmphasis(leaves: readonly AdfNode[]): AdfNode[] {
return leaves.map((leaf) => withMarks(leaf, nodeMarks(leaf).filter((mark) => !isEmphasis(mark))))
}
// Pairs that fall together may hold one another, so a leaf drops its mark at each depth a run over it names.
// The runs one pass takes back may nest, so a leaf drops its mark at each depth a run over it names.
function withoutMarks(leaves: readonly AdfNode[], runs: readonly MarkRun[]): AdfNode[] {
const depths = new Map<number, number[]>()
for (const run of runs) {