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

Whitespace around <ruby> is removed #904

Closed
YodasWs opened this issue Apr 7, 2018 · 1 comment
Closed

Whitespace around <ruby> is removed #904

YodasWs opened this issue Apr 7, 2018 · 1 comment

Comments

@YodasWs
Copy link
Contributor

YodasWs commented Apr 7, 2018

<ruby> is an inline tag, yet the minifier is removing all whitespace that surrounds it.

Example

Input

<p>I love to eat <ruby lang="fr">pain au chocolat<rt lang="en-US">chocolate croissants</rt></ruby> and éclairs.</p>

Expected

I would not expect the above line to have any changes.

Actual

I am actually getting this output:

<p>I love to eat<ruby lang="fr">pain au chocolat<rt lang="en-US">chocolate croissants</rt></ruby> and éclairs.</p>

Which would get displayed like this in a browser:

I love to eatpain au chocolatand éclairs.

<rp>

⚠️ You will also need to test and potentially correct whitespace in/around <rp>. E.g.:

<p>I love to eat <ruby lang="fr">pain au chocolat<rp> (</rp><rt lang="en-US">chocolate croissants</rt><rp>)</rp></ruby> and éclairs.</p>

ℹ️ Notice the space before the opening parenthesis in the first <rp>.

also

This was found in html-minifier version 3.5.6.

@alexlamsl
Copy link
Collaborator

Pull Request welcomed.

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

No branches or pull requests

2 participants