code: function runFactory(options) {
    return run
  
    /* Add an example section based on a valid example
     * JavaScript document to a `Usage` section. */
    function run(start, nodes, end) {
      var logs = {}
      var example = options.example
      var source
      var tmp
      var stop
  
      if (!exists(example)) {
        throw new Error(
          'Missing example: `' +
            example +
            '`. ' +
            'Pass an `example` or use a file at: ' +
            EXAMPLES.join(', ')
        )
      }
  
      tmp = example + '-tmp'
  
      source = preprocess(read(example, 'utf-8'))
  
      write(tmp, source, 'utf-8')
  
      /* To Do: better tmp file management. */
      stop = cept(console, 'log', intercept)
  
      try {
        uncached(tmp)
      } catch (error) {
        error.message =
          'Invalid example `' +
          example +
          '`. ' +
          'Ensure example is a valid JavaScript file:\n\n' +
          error.message
  
        throw error
      } finally {
        stop()
  
        /* istanbul ignore next */
        if (exists(tmp)) {
          remove(tmp)
        }
      }
  
      /* Add markdown. */
      return [start].concat(postprocess(source, logs, options), end)
  
      function intercept(id, lang, value) {
        if (!value) {
          value = lang
          lang = null
        }
  
        if (typeof value === 'string' && typeof id === 'string') {
          logs[id] = {id: id, lang: lang, value: value}
        }
      }
    }
  }
docs: /* Construct a transformer based on `options`.