summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/handlebars.l4
-rw-r--r--src/handlebars.yy2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/handlebars.l b/src/handlebars.l
index 39a7884..4c3c304 100644
--- a/src/handlebars.l
+++ b/src/handlebars.l
@@ -81,7 +81,7 @@ ID [^\s!"#%-,\.\/;->@\[-\^`\{-~]+/{LOOKAHEAD}
}
<mu>"{{"{LEFT_STRIP}?">" return 'OPEN_PARTIAL';
<mu>"{{"{LEFT_STRIP}?"#>" return 'OPEN_PARTIAL_BLOCK';
-<mu>"{{"{LEFT_STRIP}?"#" return 'OPEN_BLOCK';
+<mu>"{{"{LEFT_STRIP}?"#""*"? return 'OPEN_BLOCK';
<mu>"{{"{LEFT_STRIP}?"/" return 'OPEN_ENDBLOCK';
<mu>"{{"{LEFT_STRIP}?"^"\s*{RIGHT_STRIP}?"}}" this.popState(); return 'INVERSE';
<mu>"{{"{LEFT_STRIP}?\s*"else"\s*{RIGHT_STRIP}?"}}" this.popState(); return 'INVERSE';
@@ -98,7 +98,7 @@ ID [^\s!"#%-,\.\/;->@\[-\^`\{-~]+/{LOOKAHEAD}
this.popState();
return 'COMMENT';
}
-<mu>"{{"{LEFT_STRIP}? return 'OPEN';
+<mu>"{{"{LEFT_STRIP}?"*"? return 'OPEN';
<mu>"=" return 'EQUALS';
<mu>".." return 'ID';
diff --git a/src/handlebars.yy b/src/handlebars.yy
index e94ab51..ce06498 100644
--- a/src/handlebars.yy
+++ b/src/handlebars.yy
@@ -52,7 +52,7 @@ block
;
openBlock
- : OPEN_BLOCK helperName param* hash? blockParams? CLOSE -> { path: $2, params: $3, hash: $4, blockParams: $5, strip: yy.stripFlags($1, $6) }
+ : OPEN_BLOCK helperName param* hash? blockParams? CLOSE -> { open: $1, path: $2, params: $3, hash: $4, blockParams: $5, strip: yy.stripFlags($1, $6) }
;
openInverse