tildeio / simple-html-tokenizer

A lightweight JavaScript library for tokenizing non-`<script>` HTML expected to be found in the `<body>` of a document
MIT License
85 stars 33 forks source link

Do not drop newlines after <TextArea> or <PRE> #84

Closed dcyriller closed 3 years ago

dcyriller commented 4 years ago

59 applied a detail from the html spec:

A single newline may be placed immediately after the start tag of pre and textarea elements. This does not affect the processing of the element.

As html is case insensitive to tag names, it was also applied to <TextArea> or <PRE>.

But... Angle bracket components have been introduced. And <TextArea> is now primarly a component, instead of a <textarea>.

This PR would adjust the html spec implementation to only lowercased textarea and pre tags.

fisker commented 4 years ago

html tags is insensitive, why treat lowercased one differently?

dcyriller commented 3 years ago

This is not a good solution, I'll propose another one.