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

25 lines
590 B
JavaScript
Raw Normal View History

2024-04-27 03:39:10 +00:00
'use strict'
module.exports = parse
var fromMarkdown = require('mdast-util-from-markdown')
function parse(options) {
var self = this
this.Parser = parse
function parse(doc) {
return fromMarkdown(
doc,
Object.assign({}, self.data('settings'), options, {
// Note: these options are not in the readme.
// The goal is for them to be set by plugins on `data` instead of being
// passed by users.
extensions: self.data('micromarkExtensions') || [],
mdastExtensions: self.data('fromMarkdownExtensions') || []
})
)
}
}