markdown-it-prism2

1.1.4 • Public • Published

markdown-it-prism Build Status Dependency Status npm version Bower version

markdown-it plugin to highlight code blocks using Prism

Usage

const md = require('markdown-it')();
const prism = require('markdown-it-prism');
 
md.use(prism, options);

Options

The options object may contain:

Name Description Default
plugins Array of Prism Plugins to load. The names to use can be found here. Please note that some prism plugins (notably line-numbers) rely on the DOM being present and can thus not be used with this package (see #1). []
init A function called after setting up prism. Will receive the prism instance as only argument. Useful for plugins needing further intialisation. () => {}

Package Sidebar

Install

npm i markdown-it-prism2

Weekly Downloads

2

Version

1.1.4

License

GPL-3.0

Last publish

Collaborators

  • zhouhancheng