Textarea as multi-line HTML block

The Commonmark spec says for HTML blocks (rule 1), that <script , <pre , or <style tags should start an HTML block and not be terminated until the end tag is found.

Although not specifically markup, <textarea> should be included in this rule because it is a multi-line element. If you include a multi-line textarea the rendering will break the contents in the textarea.

If this shouldn’t be included as a spec change, I’m curious what the alternative would be since it seems like Commonmark is basically a superset of HTML.

Agreed. textarea should be treated like pre.
Why don’t you submit an issue at

1 Like

Done! https://github.com/commonmark/commonmark-spec/issues/657

1 Like