Closed dadajuice closed 2 years ago
Please note that there's another issue related to append
if you use multiple append with the same context of multiple inherited files. The issue case was for one append
block type ... if I would have another file extending with another append
somehow the first element of the block doesn't appear (it keeps only the two append
value). If you want I can open another issue for this specific case, but since it must be around the same code maybe there's a quick fix you may know of.
Thank you!
Hello, can you try if it's all good using composer require pug/pug-php:dev-version-2.next
?
Seems all good! 😁 Thank you very much!
Tag released.
Hello,
I encountered a light issue when using
append
when used inside an inherited layout. Theappend
behave as expected (it works) but it also throws in a warning. This only happens with at least two levels of "extends".Example:
layout.pug
layout2.pug
test.pug
Executing the test.pug rendering gets me the good result, but with the following warning (which does not appears if you have only one level of extends).
I'm not sure why it happens with multiple inherited files only, but a simple fix would be to verify if the
$mode
property is set in the method affected by the warning to avoid it. I added the following lines in the methodparseBlock()
just after the$prev = &$this->blocks[$name];
line :It fixed the problem in my local version. I was wondering if such a fix would be possible or if you had a better one 😊.
Thank you very much for your time!