-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
Define new attributes #56
Comments
Probably will be problematic because of whitespace issue: posthtml parser can't recognize such expressions if there is whitespace in them. So |
Attributes merging turned out to be pretty easy: andreyvolokitin@7be91c5#diff-6d186b954a58d5bb740f73d84fe39073R170 |
@andreyvolokitin was this merged? How it works? |
I used it as a fork, worked fine, shouldn't be hard to make an updated PR |
Currently it is possible to use variables as values of existing attributes, but there is no ability to add new attributes. What if we check here for variables defined as attributes themselves:
and do something like
having locals:
What would be even more powerful is the ability to merge existing attributes with new ones, so we can redefine existing attributes along with adding new ones:
But I yet can not see how this instruction can be implemented with html syntax (considering that data will be defined in HTML)... Maybe some JS instruction/code within a
<script>
would fit (though this would be pretty strange thing as a whole), but then it is in conflict with the actual html content, which also may include<script>
tagsThe text was updated successfully, but these errors were encountered: