Comparing version 0.1.4 to 0.1.5
@@ -44,3 +44,3 @@ /** | ||
'isCmd': true, | ||
'globalVal': '_smartyTpl' | ||
'globalVar': '_smartyTpl' | ||
}; | ||
@@ -47,0 +47,0 @@ this.config.apply(this, arguments); |
@@ -17,7 +17,7 @@ /** | ||
var obj = {}; | ||
var matches = jsTpl.match(/__f\..+?\(/g); | ||
var matches = jsTpl.match(/__f\[\".+?\"\]\(/g); | ||
if (matches) { | ||
matches.forEach( | ||
function (item) { | ||
arr.push(item.slice(4, item.length - 1)); | ||
arr.push(item.slice(5, item.length - 3)); | ||
} | ||
@@ -24,0 +24,0 @@ ); |
@@ -209,3 +209,3 @@ /** | ||
}); | ||
return '__f.' + node.name + '(' + pstr + ')'; | ||
return '__f["' + node.name + '"](' + pstr + ')'; | ||
}, | ||
@@ -279,3 +279,3 @@ | ||
_getPipe: function (node) { | ||
return '__f.' + node.func; | ||
return '__f["' + node.func + '"]'; | ||
}, | ||
@@ -293,2 +293,3 @@ | ||
ret = ','; | ||
arr.forEach(function (node) { | ||
@@ -295,0 +296,0 @@ ret += me._getExpr(node) + ','; |
{ | ||
"name": "smarty4js", | ||
"description": "A JavaScript Template Engine Most Like Smarty", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"keywords": [ | ||
@@ -6,0 +6,0 @@ "smarty", |
198107