summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/Text/Xslate/Syntax/Handlebars.pm13
-rw-r--r--t/helpers.t2
2 files changed, 12 insertions, 3 deletions
diff --git a/lib/Text/Xslate/Syntax/Handlebars.pm b/lib/Text/Xslate/Syntax/Handlebars.pm
index bf10ab5..495fd47 100644
--- a/lib/Text/Xslate/Syntax/Handlebars.pm
+++ b/lib/Text/Xslate/Syntax/Handlebars.pm
@@ -298,7 +298,17 @@ sub nud_name {
my $name = $self->SUPER::nud_name($symbol);
- return $self->call($name);
+ my $call = $self->call($name);
+
+ use Data::Dump; ddx($self->token);
+ if ($self->token->is_defined) {
+ push @{ $call->second }, $self->expression(0);
+ }
+ elsif ($name->id ne 'mark_raw') {
+ push @{ $call->second }, $self->vars;
+ }
+
+ return $call;
}
sub led_name {
@@ -445,7 +455,6 @@ sub std_block {
($block{else}
? $block{else}{raw_text}->clone
: $self->literal('')),
- $self->vars,
@{ $name->second },
),
);
diff --git a/t/helpers.t b/t/helpers.t
index 52b7e09..98a72ba 100644
--- a/t/helpers.t
+++ b/t/helpers.t
@@ -7,7 +7,6 @@ use Test::Handlebars;
use Text::Xslate 'mark_raw';
-{ local $TODO = "unimplemented";
render_ok(
{
function => {
@@ -61,6 +60,7 @@ RENDERED
"helpers with literal args"
);
+{ local $TODO = "unimplemented";
render_ok(
{
function => {