Closed zuozuomuxi closed 1 year ago
Custom void tags must be written in a self-closing form to be parsed.
var { valid, parse } = require("node-html-parser") const voidTags = ['x-tag']; const html1 = `<div><x-tag></div>`; const html2 = `<div><x-tag /></div>`; // => false. Expected to be true console.log(valid(html1, { voidTag: { tags: voidTags, } })); // => true console.log(valid(html2, { voidTag: { tags: voidTags, } }));
Custom void tags must be written in a self-closing form to be parsed.