You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Last word before a nested quotation moves into the quotation #886
Yes, using the built-in web transfer EPUB optimizer
Cache State
Yes, book cache (Reader menu > Delete Book Cache)
Describe the Bug
The last word of a paragraph sometimes ends up in the indented quotation that follows it. The same EPUB displays correctly on android/desktop with different apps
For example, this structure:
<div>Their hypothesis was remarkably straightforward:<div class="quote"><i>If an MBA education...</i></div></div>
renders with the introduction ending at remarkably, followed by an indented straightforward:If an MBA education...., straightforward: should stay in the introduction.
The word is still in partWordBuffer when the nested <div> starts a new text block. The following <i> flushes it into the quotation instead of the preceding paragraph.
This patch flushes the pending word before starting a block. It adds regression tests for nested quotations and headings. Both fail without the fix, and all 41 parser tests pass with it. I also checked before/after renders and confirmed the fix on my device after clearing the book cache.
This looks closely related to CrossPoint #519, which fixed the same behavior for <br/>.
The patch still needs a layout-cache version bump so existing books pick up the fix without manual cache clearing.
Activity
fix: keep words before nested EPUB blocks (fixes #886)