Closed Spone closed 7 years ago
Thanks, I plan it for version 3.0. Depending on my free time, maybe I could add it before. If you can, feel free to propose a pull-request.
Implemented, please upgrade to 2.6.0.
That was fast, thanks!
I updated to 2.6.0, but I have this error when I try to use dynamic mixins:
Notice: Undefined index: hit-article_mixin in pug.stream:// [...]
Fatal error: Uncaught Error: Function name must be a string in pug.stream:// [...]
Undefined index: hit-article_mixin
is not about dynamic mixins use. It means the declaration for the mixin is missing. Please show the mixin hit-article
declaration and the call.
I did not change the default value for this option. I have other mixins with dashes -
in the name and they work correctly.
Yes sorry, it was a bad interpretation, I removed my message. The dynamic mixin try to access hit-article, that seems right. Does the declaration exists?
As you can see, this unit test succeed: https://github.com/pug-php/pug/blob/master/tests/templates/mixins.dynamic.jade Can you provide a unit test to reproduce your bug?
The simple test case works for me. There is probably an issue somewhere else in my code.
I fixed my issue by enabling the 'pugjs' => true
option.
I tried to use interpolation in mixin name, as allowed in Pug (see this issue https://github.com/pugjs/pug/issues/1282) but it does not seem to work with pug-php.
I encountered an issue with the following code:
I expected to get:
But I actually get:
Will you support this feature?