Skip to content
Myr

Started parsing of views

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by visionmedia · committed by visionmedia · parent 06050c9 · Browse files · 4 files+13 added−5 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

4 files+13 added−5 removed

  • tests:+4 added−4 removed
  • other:+9 added−1 removed

4 files+13 added−5 removed

modified:lib/express.core.js+9 added-1 removed
405 unmodified lines
406 promise.addCallback(callback)407 promise.addErrback(errorCallback)408 },409 410 parseView : function(contents, context) {411 return contents.replace(/\{(.*?)\}/gm, function(_, js){412 return eval('with(Express) { with (context || {}){ ' + js + ' }}')413 })414 },415 416 display : function(path) {411 417 this.readFile(path, function(content){418 p(Express.parseView(content))419 })420 }421 }422 423 get = Express.routeFunctionFor('get')
29 unmodified lines
modified:spec/data/example.html.js+1 added-1 removed
modified:spec/spec.dom.html+2 added-2 removed
modified:spec/spec.rhino.js+1 added-1 removed