0
2020-10-20 05:15:30 +00:00

11 lines
277 B
JavaScript

const { parseDOM } = require("htmlparser2");
const serialize = require("dom-serializer");
module.exports = function render(code, ...processors) {
const dom = parseDOM(code, { xmlMode: true });
processors.forEach(processor => processor(dom));
return serialize(dom);
};