Skip to content

Commit

Permalink
Remove support for non-HTML doctypes
Browse files Browse the repository at this point in the history
Related to syntax-tree/hast@2.4.0
  • Loading branch information
wooorm committed May 2, 2021
1 parent b1dfbcc commit 908b24c
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions lib/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/**
* @typedef {import('parse5').Document} P5Document
* @typedef {import('parse5').DocumentFragment} P5Fragment
* @typedef {import('parse5').DocumentType} P5Doctype
* @typedef {import('parse5').Element} P5Element
* @typedef {import('parse5').Attribute} P5Attribute
* @typedef {import('parse5').Location} P5Location
Expand Down Expand Up @@ -267,16 +266,13 @@ export function raw(tree, file, options) {
* @returns {void}
*/
function doctype(node) {
/** @type {P5Doctype} */
// @ts-ignore it’s a doctype.
var p5 = toParse5(node)
resetTokenizer()
parser._processToken({
type: doctypeToken,
name: p5.name,
name: 'html',
forceQuirks: false,
publicId: p5.publicId,
systemId: p5.systemId,
publicId: '',
systemId: '',
location: createParse5Location(node)
})
}
Expand Down

0 comments on commit 908b24c

Please sign in to comment.