From 5ca0aa61c97728ebb241ae0c5009f9115ad6137c Mon Sep 17 00:00:00 2001 From: Gerben Date: Tue, 10 Apr 2018 21:11:50 +0200 Subject: [PATCH] Remove internalSubset support. It seems unsupported in any modern browser, and absent from current DOM specs. --- index.js | 1 - index.test.js | 10 ---------- 2 files changed, 11 deletions(-) diff --git a/index.js b/index.js index d214260..b27d194 100644 --- a/index.js +++ b/index.js @@ -7,7 +7,6 @@ export default function doctypeToString(doctype) { + (doctype.systemId ? (doctype.publicId ? `` : ` SYSTEM`) + ` "${doctype.systemId}"` : ``) - + (doctype.internalSubset ? ` [${doctype.internalSubset}]` : ``) + `>` return doctypeString } diff --git a/index.test.js b/index.test.js index d1187ec..0197d78 100644 --- a/index.test.js +++ b/index.test.js @@ -36,13 +36,3 @@ test('should work for a doctype without public id', t => { const doc = makeStubDocument(doctype) t.is(doctypeToString(doc.doctype), doctype) }) - -// Cannot test, as modern parsers do not to support internal declarations. -// test('should work for a doctype with internal declarations', t => { -// const doctype = ` -// -// ]>` -// const doc = makeStubDocument(doctype) -// t.is(doctypeToString(doc.doctype), doctype) -// })