Remove HTML formatting from Markdown with remark.
npm:
npm install remark-strip-html
var remark = require('remark');
var strip = require('remark-strip-html');
remark()
.use(strip)
.process('<pre>Hello</pre>', function (err, file) {
if (err) throw err;
console.log(String(file));
});
Yields:
Hello
Modifies remark to expose Markdown with HTML formatting removed.
- Removes HTML tags