1.1.0 • Published 6 years ago

markdown-it-anchor-span v1.1.0

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

markdown-it-anchor-span

Build Status NPM version Coverage Status

AnchorSpan plugin for markdown-it markdown parser.

Hello {|anchor|} World! => Hello <span id="anchor"></span>

Install

node.js, browser:

npm install markdown-it-anchor-span --save
bower install markdown-it-anchor-span --save

Use

var md = require('markdown-it')()
            .use(require('markdown-it-anchor-span'));

md.render('Hello {|anchor|} World!') // => 'Hello <span id="anchor"></span>'

The widgetparams can be used to determine what kind of html widget should be rendered in the output container.

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

License

MIT