Closed char101 closed 2 years ago
Hello, you can work around this issue using the explicit way:
PHP style:
mixin btn()
a(href=$attributes['href'] ?: '#')&attributes($attributes)
+btn()(href='/')
JS style:
mixin btn()
a(href=attributes.href || '#')&attributes(attributes)
+btn()(href='/')
I will inspect this. Thanks.
You can now update to the latest version (phug/phug 1.9.0) to get the proper precendence.
Hello,
I encountered an issue with the following code:
I expected to get:
But I actually get:
I have tested it with pugjs, and with pugjs, the values in
attributes
do override existing attributes.Thanks!