From 2bb4d0e2343734421f5082849e692d17846b4eee Mon Sep 17 00:00:00 2001 From: MurakamiShinyu Date: Fri, 25 Oct 2024 18:09:34 +0900 Subject: [PATCH] fix: Broken text layout at page break when ruby-text font size is larger than usual - fix #1401 --- packages/core/src/vivliostyle/layout.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/core/src/vivliostyle/layout.ts b/packages/core/src/vivliostyle/layout.ts index 7d3526649..1e670c28c 100644 --- a/packages/core/src/vivliostyle/layout.ts +++ b/packages/core/src/vivliostyle/layout.ts @@ -2103,8 +2103,11 @@ export class Column extends VtreeImpl.Container implements Layout.Column { } range.setStartBefore(node); haveStart = true; + lastGood = node; + } else if (element.localName !== "ruby") { + // Fix for issue #1319 and #1401 + lastGood = node; } - lastGood = node; if (node.contains(end)) { endNotReached = false; }