epoxy
epoxy copied to clipboard
`epoxy_style_html()`: Support attribute syntax
Currently, epoxy_style_html()
supports id
and class
attributes, but we could support additional attributes with something like this:
{{ a(href="https://example.com") link_text }}
In the long run, it'd be nice to be able to nest replacements, e.g.
{{ a(href="{{ link_url }}") link_text }}
or
{{ a href=link_url link_text }}
or maybe
{{ a c(href = link_url, link_text) }}
I need to pick an easier to parse syntax, either:
{{ a(href="https://example.com") link_text }}
or
{{ a href=link_url {{ link_text }} }}
or
{{ <a href="https://example.com"> link_text }}
The last one would allow a.class#id
but to use named attributes, you'd need to write out <a name="value">
.
I've decided not to follow through with this. Use inline formatters or switch to the whisker
engine or use ui_epoxy_mustache()
in Shiny.