Refactor content blocks to ignore lines

We can simplify our previous standalone determination logic by merging content blocks again.

Fixes #854
This commit is contained in:
kpdecker
2014-08-25 13:27:28 -05:00
parent 980c38cebf
commit dc9a2ed7eb
4 changed files with 54 additions and 106 deletions
+2 -2
View File
@@ -28,7 +28,7 @@ ID [^\s!"#%-,\.\/;->@\[-\^`\{-~]+/{LOOKAHEAD}
%%
[^\x00\n]*?\n?/("{{") {
[^\x00]*?/("{{") {
if(yytext.slice(-2) === "\\\\") {
strip(0,1);
this.begin("mu");
@@ -41,7 +41,7 @@ ID [^\s!"#%-,\.\/;->@\[-\^`\{-~]+/{LOOKAHEAD}
if(yytext) return 'CONTENT';
}
([^\x00\n]+\n?|\n) return 'CONTENT';
[^\x00]+ return 'CONTENT';
// marks CONTENT up to the next mustache or escaped mustache
<emu>[^\x00]{2,}?/("{{"|"\\{{"|"\\\\{{"|<<EOF>>) {