Skip to content

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

License

Notifications You must be signed in to change notification settings

mb21/markdown-it-pandoc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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-sup
task_lists markdown-it-task-lists
katex markdown-it-texmath, katex
mathjax markdown-it-mathjax3

Usage

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

There is an optional second argument to enable/disable markdown-it-pandoc extensions. For example:

var md = require('markdown-it')({ html: true });
require('markdown-it-pandoc')(md, { implicit_figures: false });
md.render('my markdown string');

Or using import syntax:

import markdownIt from 'markdown-it'
import markdownItPandoc from 'markdown-it-pandoc'

const md = markdownItPandoc(
  markdownIt({ html: true }),
  { implicit_figures: false }
);
md.render('my markdown string');

Note that MathJax and KaTeX are exclusive features. You cannot set both options true.

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •