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

removes <i> tags used by twitter-bootstrap #36

Closed
ashkrosh opened this issue May 16, 2012 · 8 comments
Closed

removes <i> tags used by twitter-bootstrap #36

ashkrosh opened this issue May 16, 2012 · 8 comments

Comments

@ashkrosh
Copy link

In twitter bootstrap for putting an icon in place, it use a simple form like this: but when using tidy it removes all of these tags.

@sideshowbarker
Copy link
Contributor

Is it putting out an empty <i></i> element?

If so, then to avoid that getting dropped, you need to run Tidy with the --drop-empty-elements option set to no, like this: tidy --drop-empty-elements no.

I couldn't see your example because markup gets stripped out of comments you post here, unless you put backticks around it, like this <i></i> (or whatever your example was).

@sideshowbarker
Copy link
Contributor

It's been a month but have not heard back from ashkanr yet, so closing this for now.

ashkanr, if you have further questions or comment, please feel free to re-open this.

@ashkrosh
Copy link
Author

sorry for not posting back here. Your suggested --drop-empty-elements=no did the job. Now it doesn't remove empty tags.
Thanks a lot :)

@sideshowbarker
Copy link
Contributor

Cool -- glad to hear it's working for you as expected.

@mikekay01
Copy link

I know this is closed, but I'm having the same problem. Can you explain exactly how I run Tidy with the option mentioned above? I've tried putting it in the configuration file and that doesn't work. I suspect I'm doing it wrong. Any guidance would be greatly appreciated...

@craigbarnes
Copy link
Member

On the command-line it's:

tidy --drop-empty-elements no

(not this).

In a configuration file it would be:

drop-empty-elements: no

But you may need to specify the config file to use with:

tidy -config /path/to/your/config

@mikekay01
Copy link

Actually that brings up a good question. I'm not sure where the plugin installed to, and I'm trying to use the "Custom" config file inside the plugin. Not sure how to create a new one or where they're at. Any clues

@craigbarnes
Copy link
Member

I'm not sure I understand what you mean by "plugin", but I'll try to help if you give a little more context.

skx added a commit to skx/yawns that referenced this issue May 9, 2016
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
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

4 participants