How to use the remark.default.stringify function in remark

To help you get started, we’ve selected a few remark examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mrzmmr / remark-behead / src / lib / index.js View on Github external
* working at the first occurrence of the given string._
       *
       * @name options.before
       *
       * @example
       * remark.use(behead, {weight: 1, before: '# Before this'})
       *   .process('# Hello\n# World\n# Before this')
       *
       *   => '## Hello\n## World\n# Before this\n'
       */
      if (opts.before) {
        if (switched) {
          return node
        }
        else {
          if (remark.stringify(node) === opts.before) {
            switched = true
            return node
          }
          else {
            return behead(node, opts)
          }
        }
      }

      /**
       * 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
       *

remark

markdown processor powered by plugins part of the unified collective

MIT
Latest version published 1 year ago

Package Health Score

79 / 100
Full package analysis