Skip to content

Ruby tags break rendering and search context #124

@mosaic-roll

Description

@mosaic-roll

Hi, I found two issues regarding <ruby> tags in foliate-js (also reproducible in Readest).

1. Rendering Issue:
Line breakings inside the HTML are treated as unexpected spaces around words.
Workaround: I have to manually strip all blanks in my backend.

2. Search Issue:
Searching is broken when a word contains Ruby tags. For example, if I search for "麦" in the sample below, the result only returns a single character "麦" in isolation, instead of retrieving the full sentence context. It seems the search engine ignores the surrounding context of the <ruby> block.

Sample HTML:

<p class="calibre"> この村では、見事に実った<ruby>

    <rb></rb>

<rt>むぎ</rt>

    <rb></rb>

<rt></rt>

    </ruby>が風に揺られることを<ruby>

    <rb></rb>

<rt>オオカミ</rt>

    </ruby>が走るという。</p>

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions