-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Mixin attributes does not override existing attributes #86
Comments
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. |
kylekatarnls
added a commit
that referenced
this issue
Nov 7, 2021
kylekatarnls
added a commit
that referenced
this issue
Nov 7, 2021
kylekatarnls
added a commit
that referenced
this issue
Nov 7, 2021
You can now update to the latest version (phug/phug 1.9.0) to get the proper precendence. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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!
The text was updated successfully, but these errors were encountered: