-
-
Notifications
You must be signed in to change notification settings - Fork 27
Closed
Labels
Description
Subject of the issue
The doctype node is currently more complex than what HTML supports.
Now that we have xast, there’s definitely no reason to be so complex.
Actual behaviour
There are name, public, and system fields which could have any string value, adding unnecessary complexity.
Expected behaviour
HTML allows the value of name to be case-insensitive html, no public, and an optional system of about:legacy-compat.
I propose removing name, public, and system, and thus making a doctype look like this:
{"type": "doctype"}Other tools (specifically, hast-util-to-html) could have an option to add the doctype legacy string (SYSTEM "about:legacy-compat"), and maybe even have an option to use HTML instead of html.