Skip to content

craftzdog/remark-strip-html

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

remark-strip-html

Remove HTML formatting from Markdown with remark.

Installation

npm:

npm install remark-strip-html

Usage

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

API

remark().use(strip)

Modifies remark to expose Markdown with HTML formatting removed.

  • Removes HTML tags

License

MIT © Takuya Matsuyama