Skip to content

Style change introduces spurious spaces #182

@jonasdiemer

Description

@jonasdiemer

Affected Version

0.11.1-dev

Describe the Bug

It looks like (from the code in ChapterHtmlSlimParser.cpp) the styling is currently limited to be on word boundaries.

For some cases, this introduces extra spacing (i.e. word gaps between characters that should be together), e.g. this

Because that’s <em>what we do</em>.

turns into

Because that’s what we do .

These spaces are obviously exaggerated by justified text alignment.

I am seeing we are already aware of the situation (code comment states "text styling needs to be overhauled to fix it") - creating this issue to discuss a solution.

Steps to Reproduce

  1. Open EPUB with inline italic (or bold) formatting (e.g. "....")

Expected Behavior

No space after end of style if source material contains no space

Relevant Log Output/Screenshots

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingreaderRelated to the core reader experience

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions