markdown-it-bracketed-spans

1.0.1 • Public • Published

markdown-it-bracketed-spans

Span tag plugin for markdown-it markdown parser.

Markup is based on pandoc bracketed_spans extension, for example:

paragraph with [a span]{.myClass}

Must be used together with the markdown-it-attrs plugin (that's a peer dependency).

Usage

var md = require('markdown-it')()
            .use( require('markdown-it-bracketed-spans') )
            .use( require('markdown-it-attrs') )
 
var output = md.render('foo [bar *bar*]{#id .class attr=value} baz')

Output will be:

<p>
  foo
  <span id="id" class="class" attr="value">
    bar <em>bar</em>
  </span>
  baz
</p>

Package Sidebar

Install

npm i markdown-it-bracketed-spans

Weekly Downloads

2,235

Version

1.0.1

License

MIT

Unpacked Size

3.37 kB

Total Files

4

Last publish

Collaborators

  • mb21