src/pug.js
function contextRenderer (tpl, locals, options, noCache) {
    var finalLocals = merge({}, helpers, defaultLocals, this.state, locals)

    this.body = renderer(tpl, finalLocals, options, noCache)
    this.type = 'text/html'
    return this
  }
function contextRenderer (tpl, locals, options, noCache) {
    var finalLocals = merge({}, helpers, defaultLocals, this.state, locals)

    this.body = renderer(tpl, finalLocals, options, noCache)
    this.type = 'text/html'
    return this
  }
function contextRenderer ( tpl , locals , options , noCache ) { var finalLocals = merge ( { } , helpers , defaultLocals , this . state , locals ) this . body = renderer ( tpl , finalLocals , options , noCache ) this . type = 'text/html' return this }
Render function that attached to app context

@param {String}  tpl     the template path, search start from viewPath
@param {Object}  locals  locals, will merged with global locals and ctx.state
@param {Object}  options options that pass to Pug compiler, merged with global default options
@param {Boolean} noCache use cache or not
Render function that attached to app context