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

Ruby rp tags dropped by extractCss() of extractHtml.js #65

Open
nuthrash opened this issue Feb 4, 2022 · 0 comments
Open

Ruby rp tags dropped by extractCss() of extractHtml.js #65

nuthrash opened this issue Feb 4, 2022 · 0 comments
Assignees

Comments

@nuthrash
Copy link

nuthrash commented Feb 4, 2022

It seems that the code if (!$pre.is(':visible')) { $pre.replaceWith(''); } would drop invisible tag 'rp' in recent versions of modern browsers. However, this method may cause some ePub readers which are not supported ruby (e.g. SumatraPDF) would missing parenthesis.

Taking SumatraPDF as ePub reader as an example, when ruby rp tags are existed would look like

ruby base(ruby text)

Meanwhile, the ePub file packed by save-as-ebook would look like

ruby base ruby text

I think it is better not drop the rp tags, even if they are invisible in ruby-supported browsers.
My ugly workaround code is if( pre.tagName.toLowerCase() === 'rp' ) { return; } , it just simply exclude rp tags when drop invisible tags.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants