jstransformer-marked
Marked support for JSTransformers.
Installation
npm install jstransformer-marked
API
const marked = require('jstransformer')(require('jstransformer-marked'));
marked.render('# Hello World!').body
const markedOptions = {}
marked.render('# "Hello World"', markedOptions)
marked.renderAsync('# Hello World', {
walkTokens: async (token) => {
const uriPrefix = await uriPrefixAsync()
if (token.href) {
token.href = uriPrefix + token.href
}
}
})
For all supported options see https://marked.js.org/using_advanced#options
License
MIT