Closed Riant closed 6 years ago
Indeed, it's a mistake, the $attributes
variables seems to be kept. We will fix that in the next major version (https://github.com/phug-php). Meanwhile here is a trick to fix the problem:
// mixin
mixin link($text)
a(href='#')&attributes(attributes)= $text
mixin wrap_link($text)
span&attributes(attributes)
- unset($attributes)
+link($text)
// html
+wrap_link('Hello').span
You can update to 3.0.0-alpha2, it should be fixed. Please don't hesitate to test the new pug-php 3 and give us your feedback.
Hello,
I encountered an issue with the following code:
I expected to get:
But I actually get:
Thanks!