Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Triple brackets inside 'each' loop #6

Closed
belousandrey opened this issue Nov 5, 2015 · 2 comments
Closed

Triple brackets inside 'each' loop #6

belousandrey opened this issue Nov 5, 2015 · 2 comments

Comments

@belousandrey
Copy link

Found following problem: if I use triple brackets inside {{#each}}, I get the same result as with double brackets.

my $vars = { outer => '<em>example</em>', elements => [ { inner => '<em>text</em>' }, { inner => '<h1>text</h1>' } ] };
my $template = <<EOL;
{{{outer}}}
{{#each elements}}
{{{inner}}}
{{/each}}
EOL

Is it a bug? Or I use it wrong?

@jlav1n
Copy link

jlav1n commented Dec 2, 2015

This works in http://tryhandlebarsjs.com/ with template of:
`{{#each posts}}

{{{content}}}

{{/each}}` and context of: `{ posts: [ { content: "foo" }, { content: "bar" } ] }` so it would seem to be a bug in Text::Handlebars

doy added a commit that referenced this issue Dec 3, 2015
@doy
Copy link
Owner

doy commented Dec 3, 2015

Fixed in 0.05, thanks!

@doy doy closed this as completed Dec 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants