-
Notifications
You must be signed in to change notification settings - Fork 76
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
Spaces in partial block params causes params to be ignored #288
Comments
Just am update. I'm able to temporarily work around this by substituting the spaces for Also, it seems that simply supplying any partial block param in the template with spaces breaks any old partial block... |
Also, here's an example where the param with space breaks things:
|
Some more info:
|
Sorry for the long time waiting, will check on this. |
$phpStr = LightnCandy::compile($template, array(
// Used compile flags
- 'flags' => LightnCandy::FLAG_RUNTIMEPARTIAL | LightnCandy::FLAG_THIS | LightnCandy::FLAG_SPVARS | LightnCandy::FLAG_ERROR_LOG | LightnCandy::FLAG_ERROR_EXCEPTION | LightnCandy::FLAG_ERROR_SKIPPARTIAL | LightnCandy::FLAG_PARENT | LightnCandy::FLAG_ELSE,
+ 'flags' => LightnCandy::FLAG_RUNTIMEPARTIAL | LightnCandy::FLAG_THIS | LightnCandy::FLAG_SPVARS | LightnCandy::FLAG_ERROR_LOG | LightnCandy::FLAG_ERROR_EXCEPTION | LightnCandy::FLAG_ERROR_SKIPPARTIAL | LightnCandy::FLAG_PARENT | LightnCandy::FLAG_ELSE | LightnCandy::FLAG_ADVARNAME | LightnCandy::FLAG_NAMEDARG,
'helpers' => $helpers,
'partials' => $partials,
)); Or, you can just use the alias |
The PHP Code:
The Issue:
I have a partial block where I would like to inject some params, e.g title and sub title.
It seems that when a space is included in a param for a partial block (e.g:
{{#> my_partial_block title="Some Title"}}
), then the param/variable is skipped in the actual partial block (e.g:<h1>{{{title}}}</h1>
is rendered as<h1></h1>
, I expect<h1>Some Title</h1>
.I'm running:
Flags:
The text was updated successfully, but these errors were encountered: