Browse files

cleaning up

  • Loading branch information...
1 parent 772ecd0 commit bf394d868868e899901207fd9caa99758c05329a @olado committed Dec 28, 2011
Showing with 4 additions and 4 deletions.
  1. +2 −2 doT.js
  2. +2 −2 examples/advancedsnippet.txt
View
4 doT.js
@@ -69,10 +69,10 @@
return cstart + code.replace(/\\'/g, "'").replace(/\\\\/g, "\\").replace(/[\r\t\n]/g, ' ') + ").toString().replace(/&(?!\\w+;)/g, '&#38;').split('<').join('&#60;').split('>').join('&#62;').split('" + '"' + "').join('&#34;').split(" + '"' + "'" + '"' + ").join('&#39;').split('/').join('&#47;'" + cend;
})
.replace(c.conditionalEnd, function(match, expression) {
- return "'; } out += '";
+ return "';}out+='";
})
.replace(c.conditionalStart, function(match, expression) {
- var code = "; if (" + expression + ") {\n";
+ var code = "if(" + expression + "){";
return "';" + code.replace(/\\'/g, "'").replace(/\\\\/g,"\\").replace(/[\r\t\n]/g, ' ') + "out+='";
})
.replace(c.evaluate, function(match, code) {
View
4 examples/advancedsnippet.txt
@@ -55,9 +55,9 @@ Compare xyz to 1, show 'xyz is not 1' if false:
Conditionals:
{{? it.altEmail }}
-
<p>
second email: {{= it.altEmail }}
</p>
-
{{?}}
+
+

0 comments on commit bf394d8

Please sign in to comment.