Comparing version 0.2.1 to 0.2.2
11
doT.js
@@ -28,3 +28,4 @@ // doT.js | ||
define: /\{\{##\s*([\w\.$]+)\s*(\:|=)([\s\S]+?)#\}\}/g, | ||
conditional: /\{\{\?(\?)?\s*([\s\S]*?)\}\}/g, | ||
conditional: /\{\{\?(\?)?\s*([\s\S]*?)\s*\}\}/g, | ||
iterate: /\{\{~\s*(?:\}\}|([\s\S]+?)\s*\:\s*([\w$]+)\s*(?:\:\s*([\w$]+))?\s*\}\})/g, | ||
varname: 'it', | ||
@@ -77,3 +78,3 @@ strip : true, | ||
c = c || doT.templateSettings; | ||
var cse = c.append ? startend.append : startend.split, str, needhtmlencode; | ||
var cse = c.append ? startend.append : startend.split, str, needhtmlencode, sid=0, indv; | ||
@@ -101,2 +102,8 @@ if (c.use || c.define) { | ||
}) | ||
.replace(c.iterate, function(m, iterate, vname, iname) { | ||
if (!iterate) return "'} };out+='"; | ||
sid+=1;indv = iname || "i"+sid;iterate=unescape(iterate); | ||
return "';var arr"+sid+"="+iterate+";if(arr"+sid+"){var "+indv+"=-1,l"+sid+"=arr"+sid+".length-1;while("+indv+"<l"+sid+"){" | ||
+vname+"=arr"+sid+"["+indv+"+=1];out+='"; | ||
}) | ||
.replace(c.evaluate, function(m, code) { | ||
@@ -103,0 +110,0 @@ return "';" + unescape(code) + "out+='"; |
@@ -10,3 +10,3 @@ { | ||
], | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"main": "doT", | ||
@@ -13,0 +13,0 @@ "homepage": "http://github.com/olado/doT", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7727
138
26