format-heading-as-setext.js 233 B

123456789
  1. module.exports = formatHeadingAsSetext
  2. var toString = require('mdast-util-to-string')
  3. function formatHeadingAsSetext(node, context) {
  4. return (
  5. context.options.setext && (!node.depth || node.depth < 3) && toString(node)
  6. )
  7. }