You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
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); |
|
};
|
|
|