Skip to content

The hast specification and implementation (hastscript) of Doctype (and Root) are different #58

Answered by ChristianMurphy
takahashim asked this question in Q&A
Discussion options

You must be logged in to vote

Both are correct.
The definition of doctype in hast is correct.
And hastscript generates elements exclusively.

If you want to add non-element hast type, like doctype, use https://github.com/syntax-tree/unist-builder

import { u } from 'unist-builder';

console.log(u('doctype'));

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@takahashim
Comment options

@ChristianMurphy
Comment options

@takahashim
Comment options

Answer selected by takahashim
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants