Tags not closed in generated SVG
czebe opened this issue · 3 comments
czebe commented
If I have only one <path> element as the only child of SVG root, the generated svg will have <path d="..." id="..."> but no closing tag or trailing slash. I guess this is due to how cheerio handles non-html tags(?)
czebe commented
Apparently you can use cheerio to output valid XML by calling .xml() instead of html().
This fixes the issue:
var result = options.formatting ? beautify($resultDocument.xml(), options.formatting) : $resultDocument.xml();
FWeinb commented
Thanks for investigation. This error was caused by breaking changes in cheerio
.
czebe commented
Thanks for fixing this!