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

Padding incorrectly added to lambda values in partials #286

Closed
Svish opened this issue Feb 12, 2016 · 6 comments
Closed

Padding incorrectly added to lambda values in partials #286

Svish opened this issue Feb 12, 2016 · 6 comments

Comments

@Svish
Copy link

Svish commented Feb 12, 2016

Think I've found a bug. Given this lambda passed in:

$engine->render('template', [
    'test' => function($text=null) { return 'foo'; },
]);

This template:

    "{{test}}"
    {{>partial}}

And this partial:

"{{test}}"

Renders into this:

    "foo"
    "   foo"

As you can see the value gets padded, seemingly with same padding as the partial gets itself.

Changing partial to this:

"{{#test}}{{/test}}"

It renders correctly:

    "foo"
    "foo"

Both should generate the same result, shouldn't they? So... seems like a bug 😕

bobthecow added a commit that referenced this issue Feb 14, 2016
bobthecow added a commit that referenced this issue Feb 14, 2016
@bobthecow
Copy link
Owner

You're right, good catch!

There's a fix in dev, it'll go out in the next release.

@Svish
Copy link
Author

Svish commented Feb 16, 2016

Nice! Any date on the next release? Is there a roadmap type thing somewhere?

@bobthecow
Copy link
Owner

v2.10.0 has shipped!

@Svish
Copy link
Author

Svish commented Feb 27, 2016

@bobthecow Is something missing for it to appear on packagist?

@bobthecow
Copy link
Owner

Nah, something must have gotten stuck. I kicked it and it worked :)

@Svish
Copy link
Author

Svish commented Feb 28, 2016

Fantastic! Thank you 😄

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

2 participants