Hi,
Currently attributes expect Expressions on both sides of the =. The body of elements is composable with more complex nodes like a for loop. It seems like there is no way to do the same for attributes. In my use case i want to compose a class list from a slice/iterator without allocating a temporary string and just directly writing it to the underlying fmt::Write instance.
Currently the only solutions would be:
allocating that temporary string
use markup::raw
Directly implement the Render trait
It would be nice if the attributes would be composable just like the body of html elements. If this would be changed this would obviously be a breaking change if there is no separate syntax implemented for this.
I would like to try implementing this as this crate is really really handy and helps with many of my use cases, thanks for the work.
Hi, Currently attributes expect Expressions on both sides of the
=
. The body of elements is composable with more complex nodes like afor
loop. It seems like there is no way to do the same for attributes. In my use case i want to compose a class list from a slice/iterator without allocating a temporary string and just directly writing it to the underlyingfmt::Write
instance. Currently the only solutions would be:Render
traitIt would be nice if the attributes would be composable just like the body of html elements. If this would be changed this would obviously be a breaking change if there is no separate syntax implemented for this.
I would like to try implementing this as this crate is really really handy and helps with many of my use cases, thanks for the work.
Thanks :)