htacg / tidy-html5

The granddaddy of HTML tools, with support for modern standards
http://www.html-tidy.org
2.69k stars 413 forks source link

Support CamelCase custom tags (autonomous custom elements) #873

Open mwpastore opened 4 years ago

mwpastore commented 4 years ago

React and Ember (among others) register web components with custom DOM elements in <CamelCase /> format. Ember also supports <bag.CamelCase /> and <Namespace::CamelCase /> formats. It would be useful if HTML Tidy's custom tags feature understood more than just <kebab-case /> format for autonomous custom elements.

kirisakow commented 4 years ago

What you call snake-case is called kebab-case and not snake_case.

mwpastore commented 4 years ago

@kirisakow Fixed. Thank you!

geoffmcl commented 3 years ago

@mwpastore if I am reading this correctly, maybe there is a feature request in here, somewhere...

At present, the option --custom-tags <blocklevel|empty|inline|pre>, and the service TY_(elementIsAutonomousCustomFormat)( ctmbstr element ) accepts any-thing with a hyphen... which I assume is called <kebab-case />, not <Snake_Case />, thanks @kirisakow ...

It seems you want to extend that to <CamelCase />, <bag.CamelCase />, <Namespace::CamelCase />, ... Is that it? More?

So each of these need to be defined, in code logic, developed, tested, etc, ... add some docs definitions, descriptions...

Also discuss what this feature brings to Tidy... spell out its use case... pros/cons...

Look forward to further feedback, diffs, PR, to move this forward, off discussion, to a fully specs feature... thanks...