markdown-it-ins-del

0.1.1 • Public • Published

markdown-it-ins-del

<ins> and <s> tag plugin for markdown-it markdown parser with editor attributions.

v0.1.+ requires markdown-it v4.+, see changelog.

++insert++[WZ] => <ins>insert</ins><sup>WZ</sup>

~~delete~~[WZ] => <s>delete</s><sup>WZ</sup>

Markup uses the same conditions as CommonMark emphasis.

Install

node.js, browser:

npm install markdown-it-ins-del --save
bower install markdown-it-ins-del --save

Use

var md = require('markdown-it')()
            .use(require('markdown-it-ins-`'))
            .disable('strikethrough');
 
md.render('++insert++[WZ]') // => '<p><ins>insert</ins><sup>WZ</sup></p>'
md.render('~~delete~~[WZ]') // => '<p><s>delete</s><sup>WZ</sup></p>'

Disable the 'strikethrough' module in Markdown-it.

Differences in browser. If you load script directly into the page, without package system, module will add itself globally as window.markdownitIns.

License

MIT

Package Sidebar

Install

npm i markdown-it-ins-del

Weekly Downloads

58

Version

0.1.1

License

MIT

Last publish

Collaborators

  • wentingzhu