From 763d68ba031d6236533b7b646577870c1a837a3f Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Tue, 3 Nov 2026 22:37:43 +0100 Subject: [PATCH] Name edgeDepth's parameter apart from runsBeside --- src/markdown/portable/inline-reduction.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/markdown/portable/inline-reduction.ts b/src/markdown/portable/inline-reduction.ts index d260148..441152e 100644 --- a/src/markdown/portable/inline-reduction.ts +++ b/src/markdown/portable/inline-reduction.ts @@ -215,11 +215,11 @@ function leafEdges(leaf: AdfNode, runsBefore: number | undefined, runsAfter: num } // How many of the leaf's marks the edge whitespace keeps, `undefined` where it drops at a line edge. -function edgeDepth(marks: readonly AdfMark[], runsBeside: number | undefined, whitespace: string): number | undefined { +function edgeDepth(marks: readonly AdfMark[], sharedRuns: number | undefined, whitespace: string): number | undefined { if (whitespace === '') return marks.length - const stripping = marks.findIndex((mark, index) => index >= (runsBeside ?? 0) && edgeStrippingMarks.includes(mark.type)) + const stripping = marks.findIndex((mark, index) => index >= (sharedRuns ?? 0) && edgeStrippingMarks.includes(mark.type)) const kept = stripping === -1 ? marks.length : stripping - return kept === 0 && runsBeside === undefined ? undefined : kept + return kept === 0 && sharedRuns === undefined ? undefined : kept } function spellableLine(leaves: AdfNode[], container: LineContainer, path: ConvertErrorPath): Result {