Skip to content

Commit

Permalink
cleaning up
Browse files Browse the repository at this point in the history
  • Loading branch information
olado committed Dec 28, 2011
1 parent 772ecd0 commit bf394d8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions doT.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions examples/advancedsnippet.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.