1.0.1 • Published 6 years ago

markdown-it-highlightjs-external v1.0.1

Weekly downloads
45
License
MIT
Repository
github
Last release
6 years ago

markdown-it-highlightjs-external

Preset use highlight.js with markdown-it by external_link You should add hljs external_link for use it. example:

Usage

var md = require('markdown-it')()
var mihe = require('markdown-it-highlightjs-external')
md.use(mihe, {
    hljs: 'auto', // If this set auto, plugin will use window.hljs for highlight.
    highlighted: true, // If this set false, plugin will disabled highlight.
    langCheck: function(lang) {}, // If hljs language parsing file missing, this function will callback.
})

Options

NameDescriptionDefault
hljsThe hljs parsing object. Default to use window.hljsauto
highlightedWhether or not to enable the syntax highlightingtrue
langCheckThis should be function for missing language callbackfunction(lang){}