Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
documentationFormatter(comments, {}, function (err, output) {
if (err) {
throw new Error(err)
}
var inputMarkdownContent = remark.parse(fs.readFileSync('src/api/docs.md', 'utf-8'))
var newStuff = remark.parse(output)
inject('Uppy Core & Plugins', inputMarkdownContent, newStuff)
fs.writeFileSync('src/api/docs.md', remark.stringify(inputMarkdownContent))
console.info(chalk.green('✓ documentation generated'))
})
})
* Manipulates hading nodes between but not including the two given
* strings, starting with options.between[0] and ending with
* options.between[1].
*
* @name options.between
*
* @example
* remark(behead, {weight: 1, between: ['# Hello', '# World']})
* .process('# Hello\n# Between\n# World')
*
* => '# Hello\n## Between\n# World\n'
*/
if (opts.between) {
if (switched) {
if (remark.stringify(node) === opts.between[1]) {
switched = false
return node
}
return behead(node, opts)
}
if (remark.stringify(node) === opts.between[0]) {
switched = true
return node
}
return node
}
})