Twig
Twig copied to clipboard
[html-extra] rename `html_classes()` to `html_attr()`
This function can be used for any html attribute (ie data-action, data-controller).
If acceptable, I'll update the docs.
it can be used for attributes containing a space-separated list. That's not for any attribute out there. So html_attr is too generic for what it does (thus, using the same name than the html_attr escaping strategy can cause confusion)
That's fair, maybe html_join or html_attr_join? But we'd have to configure the separator which I think would be hard (maybe not worth it).
If we were to rename to function, html_attr_join sounds good to me.
@kbond If you're ok with the new name, can you update this PR?
I'm going to close this for now. I'm now feeling it's not worth the change.