summaryrefslogtreecommitdiffstats
path: root/lib/Text/Handlebars/Compiler.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Text/Handlebars/Compiler.pm')
-rw-r--r--lib/Text/Handlebars/Compiler.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Text/Handlebars/Compiler.pm b/lib/Text/Handlebars/Compiler.pm
index a1cfddb..4df30aa 100644
--- a/lib/Text/Handlebars/Compiler.pm
+++ b/lib/Text/Handlebars/Compiler.pm
@@ -61,7 +61,7 @@ sub _generate_call {
unshift @args, $self->vars;
- if ($node->first->arity eq 'call' && $node->first->first->id eq '(make_block_helper)') {
+ if ($node->is_block_helper) {
push @{ $node->first->second }, $hash;
$node->second(\@args);
}
@@ -120,6 +120,7 @@ sub _generate_block {
? $block{else}{raw_text}->clone
: $self->parser->literal('')),
),
+ is_block_helper => 1,
),
);
}