markdown-it-ins-del

<ins> and <s> tags, with attribution, for markdown-it markdown parser.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
markdown-it-ins-del
0.1.19 years ago9 years agoMinified + gzip package size for markdown-it-ins-del in KB

Readme

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