docs: function getProcessor (filename, config) {
    if (!exists(filename)) {
      return
    }
  
    // Filename always relative to cwd
    filename = pathRelative(process.cwd(), pathResolve(filename))
  
    // Package.json relative to filename
    var pkgPath = relativePackage(pathResolve(filename))
  
    // htmly config
    config = config || getHtmlyConfig(pkgPath)
  
    config.basedir = config.basedir || dirname(pkgPath)
  
    // Check if htmly should handle this source
    config.match = config.match || ['\\.(html|xhtml|svg)$', 'i']
  
    if (!(config.match instanceof RegExp)) {
      config.match = RegExp.apply(null, Array.isArray(config.match) ? config.match : [config.match])
    }
  
    if (!(config.match).test(filename)) {
      return
    }
  
    // List local parsers according to config:
    var parsers = resolveFunctionList(config.parsers || config.parser, config.basedir)
  
    // List local processors according to config:
    var localProcessors = resolveFunctionList(config.processors || config.processor, config.basedir)
  
    function handle (src, done) {
      // Transform source
      async.waterfall([
        // 1. Parse source
        function (next) {
          var ctx = {
            config: config,
            filename: filename,
            src: src
          }
  
          var newCtx
          async.detectSeries(
            parsers,
            function (parser, callback) {
              parser(extend({}, ctx), function (err, result) {
                if (err) {
                  return done(err)
                }
                if (!result || (result.src === src)) {
                  return callback(false)
                } else {
                  newCtx = result
                  return callback(true)
                }
              })
            },
            function (found) {
              if (found) {
                next(null, newCtx)
              } else {
                next(null, ctx)
              }
            }
          )
  
        },
  
        // 2. Perform all global pre-processor on context
        compose(process.htmly.preProcessors),
  
        // 3. Perform local processor on context
        compose(localProcessors),
  
        // 4. Perform all global post-processor on context
        compose(process.htmly.postProcessors),
  
        // 5. Finalize: generate source and minify if enabled
        function (ctx, next) {
          // Minify ?
          if (process.htmly.config.minify) {
            var opts = process.htmly.config.minify
            opts = (typeof (opts) === 'object') ? opts : {}
            ctx.src = minify(ctx.src, (typeof (opts) === 'object') ? opts : {})
          }
  
          next(null, ctx)
        }
      ], done)
    }
    return handle
  }