PabloRomanH / zhongzhong

Chrome extension that translates Chinese words when hovering on them.
https://chrome.google.com/webstore/detail/zhongzhong-an-improved-ch/dggcgdjndddfmcfoipccicfoajmciacf
34 stars 14 forks source link

Ruby-ized text prevented the extension from detecting word with two or more syllables #41

Open ienablemuch opened 5 years ago

ienablemuch commented 5 years ago

The extension works exceptionally well, it can even detect words with two syllables (or more) that chinese peraperakun cannot. I really love this utility.

However with ruby-ized texts, words with two syllables (or more), made the extension sees individual hanzi only. Thus what normally works...

image

...does not work with ruby-ized hanzis. Example of ruby-ized hanzis:

image

The extension see individual hanzi only:

image

Here's ruby-ized hanzis in HTML form:

<td><ruby>不<rt>bù</rt></ruby><ruby>明<rt>míng</rt></ruby><ruby>白<rt>bái</rt></ruby></td>
PabloRomanH commented 5 years ago

I'll take a look and see if this can be done.

PabloRomanH commented 4 years ago

Test here: https://www.w3schools.com/code/tryit.asp?filename=G08ZZXDZJ7MX