Remove broken HTML escaping.

This commit is contained in:
John-David Dalton
2016-09-05 02:07:51 -07:00
parent 691db4d406
commit d1abde7d1a

View File

@@ -159,9 +159,7 @@ function build() {
// Load markdown. // Load markdown.
.readFileSync(readmePath, 'utf8') .readFileSync(readmePath, 'utf8')
// Uncomment docdown HTML hints. // Uncomment docdown HTML hints.
.replace(/(<)!--\s*|\s*--(>)/g, '$1$2') .replace(/(<)!--\s*|\s*--(>)/g, '$1$2');
// Escape HTML markup in usage examples.
.replace(/```js[\s\S]+?```/g, m => m.replace(/</g, '&lt;').replace(/>/g, '&gt;'));
const $ = marky(markdown, { 'sanitize': false }); const $ = marky(markdown, { 'sanitize': false });
const $header = $('h1').first().remove(); const $header = $('h1').first().remove();