You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
528 B
23 lines
528 B
'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') || [] |
|
}) |
|
) |
|
} |
|
}
|
|
|