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

Move from html2jade, to html2pug, to correctly support attribute casing #1

Closed
lunelson opened this issue Sep 12, 2018 · 5 comments
Closed

Comments

@lunelson
Copy link
Contributor

Hi there,

wondering if you would accept a PR that change the dependency of this package from html2jade to html2pug. The reason is html2jade has a long-standing problem concerning camelCase attributes, which makes it useless for XML-based markup e.g. SVG, and for js-framework code such as Angular.

@dbalas
Copy link
Owner

dbalas commented Sep 12, 2018

Hi

Of course I would accept!

Thanks for your interest :)

@sublime392
Copy link

This doesn't seem to be working anymore. Attributes are all lower cased.

@lunelson
Copy link
Contributor Author

lunelson commented Jun 6, 2019

I just did it on some SVG code and got the correct result -- note viewBox. Is this broken for you?

svg(xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1052.4 744.1')

@sublime392
Copy link

That example does work for me. Here is e that does not:
<div class="controls-top" *ngIf="slides.length > 1 && !checkNavigation() && isControls"></div>

@lunelson
Copy link
Contributor Author

lunelson commented Jun 6, 2019

It it looks like an issue with html2pug. You can try their conversion online here—this is what I got:

.controls-top(*ngif='slides.length > 1 && !checkNavigation() && isControls')

…so maybe I spoke too soon on the "correct attribute casing"; I guess it's set up to do it for specific attributes and doesn't recognize your angular directive

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

3 participants