Skip to content

Commit 7fd0848

Browse files
committed
Remove support for non-HTML doctypes
Related to syntax-tree/[email protected]
1 parent 21e9223 commit 7fd0848

File tree

6 files changed

+3
-23
lines changed

6 files changed

+3
-23
lines changed

Diff for: lib/index.js

+3-8
Original file line numberDiff line numberDiff line change
@@ -191,16 +191,11 @@ function root(ctx, ast, children) {
191191
* Transform a doctype.
192192
*
193193
* @type {Handler}
194-
* @param {P5Doctype} ast
195194
* @returns {Doctype}
196195
*/
197-
function doctype(_, ast) {
198-
return {
199-
type: 'doctype',
200-
name: ast.name || '',
201-
public: ast.publicId || null,
202-
system: ast.systemId || null
203-
}
196+
function doctype() {
197+
// @ts-ignore Types are out of date.
198+
return {type: 'doctype'}
204199
}
205200

206201
/**

Diff for: test/fixtures/doctype-nameless/index.json

-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
"children": [
44
{
55
"type": "doctype",
6-
"name": "",
7-
"public": null,
8-
"system": null,
96
"position": {
107
"start": {
118
"line": 1,

Diff for: test/fixtures/doctype-quirksmode-ibm/index.json

-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
"children": [
44
{
55
"type": "doctype",
6-
"name": "html",
7-
"public": null,
8-
"system": "http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",
96
"position": {
107
"start": {
118
"line": 1,

Diff for: test/fixtures/doctype/index.json

-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
"children": [
44
{
55
"type": "doctype",
6-
"name": "html",
7-
"public": null,
8-
"system": null,
96
"position": {
107
"start": {
118
"line": 1,

Diff for: test/fixtures/simple/index.json

-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
"children": [
44
{
55
"type": "doctype",
6-
"name": "html",
7-
"public": null,
8-
"system": null,
96
"position": {
107
"start": {
118
"line": 1,

Diff for: test/fixtures/template/index.json

-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
"children": [
44
{
55
"type": "doctype",
6-
"name": "html",
7-
"public": null,
8-
"system": null,
96
"position": {
107
"start": {
118
"line": 1,

0 commit comments

Comments
 (0)