md.compilers['markdown-it'] = (() => {
var defaults = {
breaks: true,
html: true,
linkify: true,
typographer: false,
xhtmlOut: false,
langPrefix: 'language-',
quotes: '“”‘’'
// highlight: (str, lang) => ''
}
var description = {
breaks: 'Convert \\n in paragraphs into
',
html: 'Enable HTML tags in source',
linkify: 'Autoconvert URL-like text to links',
typographer: 'Enable some language-neutral replacement + quotes beautification',
xhtmlOut: 'Use / to close single tags (
)'
}
var ctor = ({storage: {state}}) => ({
defaults,
description,
compile: (markdown) =>
markdownit(state['markdown-it'])
.render(markdown)
})
return Object.assign(ctor, {defaults, description})
})()