Skip to content

Commit 1d78d36

Browse files
committed
fix(math): add MathRun to sliceRunsForLine so math renders in DomPainter
MathRun was silently dropped by sliceRunsForLine because it has no `text` property. The `if (!('text' in run)) continue` guard filtered it out before it could reach the renderer. Added an explicit `run.kind === 'math'` case matching the existing image/tab/fieldAnnotation pattern. SD-2369
1 parent 54bb36a commit 1d78d36

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

packages/layout-engine/painters/dom/src/renderer.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7490,6 +7490,12 @@ export const sliceRunsForLine = (block: ParagraphBlock, line: Line): Run[] => {
74907490
continue;
74917491
}
74927492

7493+
// MathRun handling - math runs are atomic units like images
7494+
if (run.kind === 'math') {
7495+
result.push(run);
7496+
continue;
7497+
}
7498+
74937499
// At this point, run must be TextRun (has .text property)
74947500
if (!('text' in run)) {
74957501
continue;

0 commit comments

Comments
 (0)