You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
hast recenly moved to no longer respecting `public`, `system`
on doctype nodes, as they do not affect HTML.
For folks that are handling XML, xast is a much better ecosystem
that does allow more complex doctypes.
See: <syntax-tree/hast#19>
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
, andsystem
fields which could have any string value, adding unnecessary complexity.Expected behaviour
HTML allows the value of
name
to be case-insensitivehtml
, nopublic
, and an optionalsystem
ofabout:legacy-compat
.I propose removing
name
,public
, andsystem
, and thus making a doctype look like this: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 useHTML
instead ofhtml
.The text was updated successfully, but these errors were encountered: