next = (result, cb) => {
      _treeExtendApi(result, this)

      // all plugins called
      if (this.plugins.length <= i) {
        cb(null, result)
        return
      }

      // little helper to go to the next iteration
      function _next (res) {
        if (res && !options.skipParse) {
          res = [].concat(res)
        }

        return next(res || result, cb)
      }

      // call next
      const plugin = this.plugins[i++]

      if (plugin.length === 2) {
        plugin(result, (err, res) => {
          if (err) return cb(err)
          _next(res)
        })
        return
      }

      // sync and promised plugins
      let err = null

      const res = tryCatch(() => plugin(result), e => {
        err = e
        return e
      })

      if (err) {
        cb(err)
        return
      }

      if (isPromise(res)) {
        res.then(_next).catch(cb)
        return
      }

      _next(res)
    }
## PostHTML Options

@type {Object}
@prop {?Boolean} options.sync - enables sync mode, plugins will run synchronously, throws an error when used with async plugins
@prop {?Function} options.parser - use custom parser, replaces default (posthtml-parser)
@prop {?Function} options.render - use custom render, replaces default (posthtml-render)
@prop {?Boolean} options.skipParse - disable parsing
@prop {?Array} options.directives - Adds processing of custom [directives](https://github.com/posthtml/posthtml-parser#directives).