md.compilers.remarkable = (() => {
var defaults = {
breaks: false,
html: true,
linkify: true,
typographer: false,
xhtmlOut: false,
langPrefix: 'language-',
quotes: '“”‘’'
}
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) =>
new Remarkable('full', state.remarkable)
.render(markdown)
})
return Object.assign(ctor, {defaults, description})
})()