-
Notifications
You must be signed in to change notification settings - Fork 418
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
Empty <i> tags stripped #19
Comments
Hmm, an option to ignore stripping certain tags would be very welcome, I just ran into some hack today where Something along the lines of a |
Hey Michael, first of all thanks a lot for this fix! I'm testing it right now, and seems that only the first level of empty elements are preserved when they are nested (I know...). So this:
Becomes this (indentation edited for comparability):
Edit: adding
Edit2: just found out that this is actually an old method called "Nifty corners" for image-less rounded corners in older browsers: http://www.html.it/articoli/nifty/index.html |
This actually isn't caused by the empty-element-dropping part of the code. It's caused by another part of the code that merges nested markup. So if you do this:
You get this:
There is no option for preventing tidy from doing that, but I'll see if I can add one. |
Added two new options, "merge-emphasis" and "coerce-endtags": http://w3c.github.com/tidy-html5/quickref.html#merge-emphasis Both are set to "yes" by default, to preserve the existing behavior. |
This turns out to solve the issue of HTML::Tidy tidying up empty tags, at least until we get a newer version of the `tidy` package in Debian. See also: * htacg/tidy-html5#19 * htacg/tidy-html5#36
Tidy removes empty
<i>
tags, which are used by Twitter Bootstrap for placed GlyphiconsIs there an option to tell Tidy to never remove tags? If not, maybe there should be.
The text was updated successfully, but these errors were encountered: