remark-strip-html
Version:
Remove html formatting from Markdown
54 lines (33 loc) • 775 B
Markdown
Remove HTML formatting from Markdown with [**remark**][remark].
[][]:
```bash
npm install remark-strip-html
```
```javascript
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:
```text
Hello
```
Modifies **remark** to expose Markdown with HTML formatting removed.
* Removes HTML tags
[][license] © [Takuya Matsuyama][author]
<!-- Definitions -->
[]: https://docs.npmjs.com/cli/install
[]: LICENSE
[]: https://www.craftz.dog/
[]: https://github.com/wooorm/remark