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

Bug - Ashes doesn't respect kw args in partials #14

Closed
jvanasco opened this issue May 8, 2014 · 3 comments
Closed

Bug - Ashes doesn't respect kw args in partials #14

jvanasco opened this issue May 8, 2014 · 3 comments

Comments

@jvanasco
Copy link
Contributor

jvanasco commented May 8, 2014

in the example below, kwargs do not transfer from parent to child.

01_parent.dust

<!-- 01_parent.dust -->
<h1>01_parent</h1>
    {>"02_child.dust" animal="dog" name="bear"/}
<!-- /01_parent.dust -->

02_child.dust

<!-- 02_child.dust -->
<h1>02_child</h1>
    animal={animal}
    name={name}
<!-- /02_child.dust -->

here's the same thing in javascript using the dust library

var parent = '<!-- 01_parent_dust --><h1>01_parent</h1>{>"02_child_dust" animal="dog" name="bear"/}<!-- /01_parent_dust -->';
var child = '<!-- 02_child_dust --><h1>02_child</h1>animal={animal} name={name}<!-- /02_child_dust -->';

dust.loadSource(dust.compile(parent, '01_parent_dust'));
dust.loadSource(dust.compile(child, '02_child_dust'));

dust.render("01_parent_dust", {}, function(err, out) {
    console.log(out);
});

i'm not sure how/where to fix this.

@jvanasco
Copy link
Contributor Author

jvanasco commented May 9, 2014

this seems to be a feature in the more-popular LinkedIn fork of dust.js -- v1.0

i think i have a solution and will issue a pull request.

@jvanasco
Copy link
Contributor Author

jvanasco commented May 9, 2014

I've also created a list that shows the compatibility of Ashes with the LinkedIn fork of Dust

https://github.com/mahmoud/ashes/wiki/Compatibility-with-LinkedIn-Dust.JS-Fork

@jvanasco
Copy link
Contributor Author

closing this, since it seems supported now.

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

1 participant