Have ideas to improve npm?Join in the discussion! »

markdown-it-pandoc

1.1.0 • Public • Published

markdown-it-pandoc

Package bundling a few markdown-it plugins to approximate pandoc flavoured markdown.

For a demo, you can try PanWriter.

Dependencies

This package requires a lot of peer dependencies, depending on which extensions you enable. For up-to-date information, it is probably best to take a quick look at the source.

Options Plugin dependency
bracketed_spans + attributes markdown-it-bracketed-spans
attributes markdown-it-attrs
fenced_divs + attributes markdown-it-container
definition lists markdown-it-deflist
footnotes markdown-it-footnote
implicit_figures markdown-it-implicit-figures
grid_tables markdown-it-gridtables
subscript markdown-it-sub
superscript markdown-it-soup
katex markdown-it-texmath, katex

Usage

var md = require('markdown-it-pandoc')()
md.render('my markdown string')

There are two optional arguments. The first is passed on directly to markdown-it. With the second you can enable/disable markdown-it-pandoc extensions. For example:

var md = require('markdown-it-pandoc')({
  html: true
}, {
  implicit_figures: false
})

Install

npm i markdown-it-pandoc

DownloadsWeekly Downloads

12

Version

1.1.0

License

MIT

Unpacked Size

5.78 kB

Total Files

4

Last publish

Collaborators

  • avatar