Closed sjinks closed 4 years ago
Need to handle nonces as well…
@AnujRNair it looks like the proper implementation will take much more effort that I have originally estimated, that's why I would like to ask you first if you are OK with this :-)
Right now, I see three options
const render = require('dom-serializer').default;
/* ... */
// defaultProcessFn:
const isXHTML = get(htmlPluginData, 'plugin.options.xhtml', false);
htmlPluginData.html = isXHTML
? render($._root.children, { selfClosingTags: true, emptyAttrs: true })
: $.html();
Once cheerio
reaches 1.0.0, this will be simplified to:
const isXHTML = get(htmlPluginData, 'plugin.options.xhtml', false);
const options = isXHTML ? { selfClosingTags: true, emptyAttrs: true } : {};
htmlPluginData.html = $().html(options);
What do you think?
Closing, as it looks like there is no interest in this PR.
Summary
See #61
This PR
Requirements (place an
x
in each[ ]
)