Skip to content

Last word before a nested quotation moves into the quotation #886

Open

Description

@yassine-cc

Device

X4 Pro

Affected Version

1.6.1

EPUB Optimization

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

  1. self-assigned this
    on Oct 22, 2026
  2. added a commit that references this issue on Oct 27, 2026
    e3d259f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions