Skip to content
This repository has been archived by the owner on Nov 27, 2018. It is now read-only.

Block helper dosen't work with mustache template #106

Open
kanonji opened this issue Dec 13, 2013 · 1 comment
Open

Block helper dosen't work with mustache template #106

kanonji opened this issue Dec 13, 2013 · 1 comment

Comments

@kanonji
Copy link

kanonji commented Dec 13, 2013

Tag helper works, but block helper doesn't work.

What I did 1.

To make sure, I did punch setup foo; punch s aside from my working project and opend in a browser.

a part of _header.mustache

<header>
    <h1>{{#upcase}}{{site-title}}{{/upcase}}</h1>

    <ul class="navbar">
    {{#navbar}}
        <li><a href="{{{href}}}">{{label}}</a>
    {{/navbar}}
    </ul>
</header>

a part of HTML rendered

<header>
    <h1></h1>

    <ul class="navbar">
    </ul>
</header>

What I did 2.

I have used https://github.com/laktek/punch-current-page-helper in my project has also the broblem.
When I added console.log(text) before https://github.com/laktek/punch-current-page-helper/blob/05160af5231291468c80052076d68c46502e810d/lib/current_page_helper.js#L17 , I got empty in text.

I tried to figure out the cause by reading the sourcecode.
Because caller of the helpers seems in mustache.js, I gave up and switch template engine to punch-engine-handlebars.
Block helper works with punch-engine-handlebars.
I'm not sure this problem is just on me or not.

My env.

Env version
node v0.11.9
npm 1.3.15
punch 0.5.40
mustache 0.8.0
OS Mac OS X Lion
@laktek
Copy link
Owner

laktek commented Jan 1, 2014

This seems to be a bug originated with Mustache.js 0.8.0, for now I reverted the dependency to Mustache.js 0.7.3 95b1044.

This change should be reflected from Punch versions 0.5.43.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants