lix-website/themes/lix/assets/bootstrap/node_modules/remark-stringify/index.js

24 lines
528 B
JavaScript
Raw Normal View History

2024-04-27 03:39:10 +00:00
'use strict'
module.exports = stringify
var toMarkdown = require('mdast-util-to-markdown')
function stringify(options) {
var self = this
this.Compiler = compile
function compile(tree) {
return toMarkdown(
tree,
Object.assign({}, self.data('settings'), options, {
// Note: this option is not in the readme.
// The goal is for it to be set by plugins on `data` instead of being
// passed by users.
extensions: self.data('toMarkdownExtensions') || []
})
)
}
}