threedaymonk / htmlbeautifier

A normaliser/beautifier for HTML that also understands embedded Ruby. Ideal for tidying up Rails templates.
MIT License
325 stars 59 forks source link

lowercase element names (tags) #42

Closed jm3 closed 2 years ago

jm3 commented 7 years ago

My experience with other HTML tidiers leads me to expect that htmlbeautifier would support tag case normalization e.g. normalizing (upper, lower, etc.) the letter case of all element and attribute names, leaving element values untouched.

<A HREF="foo">bar</A> → <a href="foo">bar</a>

That would be pretty handy to have in htmlbeautifier. Is there any objection to adding that? Would you be open to PRs?

threedaymonk commented 7 years ago

I'm definitely open to it. It might need a wholesale refactoring to achieve it, but … go ahead if you're inspired!

jm3 commented 7 years ago

I guess I was unfairly biased toward this being a quick-fix because this feature was a command-line option on HTMLtidy for decades. I'll have to dig into how you're parsing the HTML.

threedaymonk commented 2 years ago

I'm still open to PRs, but I'm closing this issue as there has been no activity for a while