Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to display extra base text/ruby text in <ruby>? #6545

Open
vickyhan618 opened this issue Apr 1, 2021 · 0 comments
Open

How to display extra base text/ruby text in <ruby>? #6545

vickyhan618 opened this issue Apr 1, 2021 · 0 comments
Labels
i18n-tracker Group bringing to attention of Internationalization, or tracked by i18n but not needing response.

Comments

@vickyhan618
Copy link

vickyhan618 commented Apr 1, 2021

There is a 28 steps algorithm described in https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-ruby-element

When ruby base and ruby text is not 1:1 matching, how to display extra ruby base text and ruby text?
I got some examples, and I followed the algorithm step by step. After I get the output, I still don't know how to display. I also noticed chrome and firefox have different behavior(chrome drop the extra ruby text to normal text, firefox display it on top).

Case1: 2 rb with 1 rt
e.g. "りょうとう"

Output: base text segment: {[0,1)}
Annotation segment: {[1,2)}
Ignored segment: {[2,3)}
Associate [0,1) -> [1,2)
=> "東' seems is treated as ignored segment basing on the algorithm, however text says "Ignored segments do not form part of the document's semantics". That seems to contradict the algorithm? How to display ignored segment?

Case2: empty rt/rt occurs first, "Aaa"
start index is only set at step 12. But if the first rt is empty, we will jump from 11 to 18, and start index is always null. When to update start index?

Another doubt, in steps for "set the current base text", item 2 says "...described by the range annotation range." I don't see that "annotation range" is defined, and I suspect they meant "...described by the range text?

@r12a r12a added the i18n-tracker Group bringing to attention of Internationalization, or tracked by i18n but not needing response. label Apr 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
i18n-tracker Group bringing to attention of Internationalization, or tracked by i18n but not needing response.
Development

No branches or pull requests

2 participants