From 710288fd364a07f7a2a3c3fff427f981624e0462 Mon Sep 17 00:00:00 2001 From: Greg Dean Date: Mon, 23 May 2022 10:09:35 -0500 Subject: [PATCH] Added Nested DOCTYPE This is to allow nested SVGs to be converted correctly. --- source.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source.js b/source.js index d0dab37..c0d51b1 100644 --- a/source.js +++ b/source.js @@ -438,6 +438,8 @@ var SVGtoPDF = function(doc, svg, x, y, options) { return new SvgNode(null, 8, temp, error); } else if (temp = parser.match(/^<\?[\s\S]*?\?>/)) { // Processing instructions return new SvgNode(null, 7, temp, error); + } else if (temp = parser.match(/^/)) { // NESTED Doctype + return new SvgNode(null, 10, temp, error); } else if (temp = parser.match(/^/)) { // Doctype return new SvgNode(null, 10, temp, error); } else if (temp = parser.match(/^/, true)) { // Cdata node