Comparing version 0.2.0 to 0.2.1
16
doT.js
@@ -28,5 +28,3 @@ // doT.js | ||
define: /\{\{##\s*([\w\.$]+)\s*(\:|=)([\s\S]+?)#\}\}/g, | ||
conditionalStart: /\{\{\?([\s\S]+?)\}\}/g, | ||
conditionalElse: /\{\{\?\?\s*([\s\S]*?)\s*\}\}/g, | ||
conditionalEnd: /\{\{\?\}\}/g, | ||
conditional: /\{\{\?(\?)?\s*([\s\S]*?)\}\}/g, | ||
varname: 'it', | ||
@@ -84,3 +82,3 @@ strip : true, | ||
str = resolveDefs(c, tmpl, global.def); | ||
if (olddef) global.def = olddef; else delete global.def; | ||
global.def = olddef; | ||
} else str = tmpl; | ||
@@ -98,9 +96,7 @@ | ||
}) | ||
.replace(c.conditionalEnd, "';}out+='") | ||
.replace(c.conditionalElse, function(m, code) { | ||
return (code) ? "';}else if(" + unescape(code) + "){out+='" : "';}else{out+='"; | ||
.replace(c.conditional, function(m, elsecase, code) { | ||
return elsecase ? | ||
(code ? "';}else if(" + unescape(code) + "){out+='" : "';}else{out+='") : | ||
(code ? "';if(" + unescape(code) + "){out+='" : "';}out+='"); | ||
}) | ||
.replace(c.conditionalStart, function(m, code) { | ||
return "';if(" + unescape(code) + "){out+='"; | ||
}) | ||
.replace(c.evaluate, function(m, code) { | ||
@@ -107,0 +103,0 @@ return "';" + unescape(code) + "out+='"; |
@@ -10,3 +10,3 @@ { | ||
], | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"main": "doT", | ||
@@ -13,0 +13,0 @@ "homepage": "http://github.com/olado/doT", |
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
7255
131