markdown-it-bracketed-spans

<span> tag for markdown-it markdown parser.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
markdown-it-bracketed-spans
1521.0.14 years ago4 years agoMinified + gzip package size for markdown-it-bracketed-spans in KB

Readme

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>