0.2.0 • Published 1 year ago

markdown-it-glfm-multline-blockquote v0.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

markdown-it-glfm-multline-blockquote

Plugin to add GitLab Flavored Markdown (GLFM) multiline blockquote syntax for the markdown-it markdown parser.

Supports the >>> multiline blockquote syntax.

>>>
This is a **quote**

- item 1
- item 2
>>>

gives

<blockquote>
<p>This is a <strong>quote</strong></p>
<ul>
<li>item 1</li>
<li>item 2</li>
</ul>
</blockquote>

As it follows the CommonMark fenced code block rules, you can embed blockquotes within blockquotes:

- item 1

  >>>>
  Quoting another quote

  >>>
  second quote
  >>>
  >>>>

Install

node.js, browser:

npm install markdown-it-glfm-multline-blockquote --save
bower install markdown-it-glfm-multline-blockquote --save

Use

var md = require('markdown-it')()
           .use(require('markdown-it-glfm-multline-blockquote'));

md.render('>>>\nThis is a quote\n>>>') // => '<blockquote><p>This is a quote</p></blockquote>'

You can enable/disable the plugin:

md.enable('container_multiline_blockquote');
md.disable('container_multiline_blockquote');

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

License

MIT