Closed pipe01 closed 5 years ago
As I mentioned before elsewhere, this tool does not parse HTML but walks the DOM tree built by a 3rd-party HTML parser (formerly jsdom
, now jsdom-little
). So this issue can only be resolved by switching to a different package but, given that html2jade
is currently in maintenance mode, I think such change in behavior will impact too many users to be acceptable.
Sorry but I think your best bet is to address the issue in a fork or find another tool that meets your need.
For example, this:
Yields:
It looks like there was a discussion over at #74, but no solution was reached. I understand it's not 100% valid HTML, but it's really useful when using SPA frameworks like Vue where you can have a custom component in HTML like
<my-component />
, instead of<my-component></my-component>
.