Преглед изворни кода

Revert "Parse pragmas only once"

This reverts commit 738de0bcae.

Conflicts:

	mustache.js
tags/0.2.3
Jan Lehnardt пре 16 година
родитељ
комит
d9ab0b0041
1 измењених фајлова са 1 додато и 5 уклоњено
  1. +1
    -5
      mustache.js

+ 1
- 5
mustache.js Прегледај датотеку

@@ -17,7 +17,6 @@ var Mustache = function() {
ctag: "}}",
pragmas: {},
buffer: [],
pragmas_parsed: false,
pragmas_implemented: {
"IMPLICIT-ITERATOR": true
},
@@ -37,9 +36,7 @@ var Mustache = function() {
this.buffer = [];
}

if(!this.pragmas_parsed) {
template = this.render_pragmas(template);
}
template = this.render_pragmas(template);
var html = this.render_section(template, context, partials);
if(in_recursion) {
return this.render_tags(html, context, partials, in_recursion);
@@ -61,7 +58,6 @@ var Mustache = function() {
Looks for %PRAGMAS
*/
render_pragmas: function(template) {
this.pragmas_parsed = true;
// no pragmas
if(template.indexOf(this.otag + "%") == -1) {
return template;


Loading…
Откажи
Сачувај