Changeset 3611
- Timestamp:
- 12/26/07 20:00:54 (5 years ago)
- Files:
-
- 1 modified
-
lang/javascript/blosxom.rhino/ejs.js (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/javascript/blosxom.rhino/ejs.js
r3602 r3611 5 5 initialize : function (template, opts) { 6 6 this.template = template; 7 this.processor = this.compile(template, opts || {}); 7 this.generator = this.compile(template, opts || {}); 8 this.processor = this.generator(); 8 9 // print(this.processor); 9 10 }, … … 54 55 ); 55 56 ret.push("}"); 56 return (new Function(ret.join(''))).call();57 return new Function(ret.join('')); 57 58 } 58 59 }; … … 68 69 //for (var i = 0; i < tester.length; i++) { 69 70 // var t = EJS(tester[i], {useWith: true}); 70 // print(t. processor);71 // print(t.generator); 71 72 // print(t.run({foo:"test", bar:"foobar"})); 72 73 //} … … 89 90 // }, 90 91 // function replace () { 91 // t.replace(/<%=s\.(\w+)%>/ , function (_,a) {92 // t.replace(/<%=s\.(\w+)%>/g, function (_,a) { 92 93 // return m[a]; 93 94 // });
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)