Skip to content

Commit

Permalink
Fixed two regressions introduced by the Diet compiler refactoring.
Browse files Browse the repository at this point in the history
  • Loading branch information
s-ludwig committed Dec 30, 2012
1 parent 8cb1027 commit 0f85fd0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions source/vibe/templ/diet.d
Expand Up @@ -692,7 +692,6 @@ private struct DietCompiler {
foreach_reverse( flt; filters ) filter_expr ~= "s_filters[\""~dstringEscape(flt)~"\"](";
filter_expr ~= "\"" ~ dstringEscape(content) ~ "\"";
foreach( i; 0 .. filters.length ) filter_expr ~= ", "~cttostring(indent)~")";
filter_expr ~= ");\n";

output.writeStringExpr(filter_expr);
}
Expand Down Expand Up @@ -838,7 +837,7 @@ private struct DietCompiler {
while( i < str.length ){
// check for escaped characters
if( str[i] == '\\' ){
if( i > start ) output.writeRawString(str[start .. i]);
if( i > start ) output.writeString(str[start .. i]);
output.writeRawString(sanitizeEscaping(str[i .. i+2]));
i += 2;
start = i;
Expand All @@ -864,7 +863,7 @@ private struct DietCompiler {
} else i++;
}

if( i > start ) output.writeRawString(str[start .. i]);
if( i > start ) output.writeString(str[start .. i]);
}

private string skipIdent(in ref string s, ref size_t idx, string additional_chars = null)
Expand Down

0 comments on commit 0f85fd0

Please sign in to comment.