rstml: variant of `html-to-string-macro` which returns something that `impl ToString` (return the nodes themselves)
typed_html does this, and i believe it allows them to do cool things like having iterators in the macro. currently, i believe you would have to use the html! macro to create strings in the loop then join them at the end, which seems kinda jank.
would this be possible?
edit: written by myself: https://github.com/vidhanio/html-node
About this issue
- Original URL
- State: open
- Created 3 years ago
- Comments: 15
@infogulch - yep! the
#flag enables pretty-printing, whereas without it, it all prints on one line (much like howDebugwith#?works)@infogulch… a few hours later, i’ve cooked up something AMAZING
ident: Typein the “extensions” list will use theTypeas an extension set of typed attributes, and those with justidentwill be added to the list of “other” attributes likedata-*andaria-*and you can have as many extensions as you want!
and then, you can create your own decl macro for your crate that wraps
typed::html!to add your custom attribute extensions for all macros.@vldm - maybe there could be a section called “powered by rstml” in the readme that this could be put under? then maybe you could create an example which uses
html-nodein this repository as well.@vidhanio Hi, awesome work! I thought of adding more complex example of
rstmlusage (maybe even to forktyped-html). But haven’t a lot of spare time to do it. Originally i have createdrs-tmlorganisation to keep tools/examples in one place, and to be able to manage ownership of rstml repository.So if you want, we can move html-node to
rs-tmlorganisation. Or/and we can add link to it in README section of rstml.I would like to keep original
html-to-stringmacro in examples and not replace it, since it is a minimal usage variant and doesn’t involve any additional runtime.alright @infogulch, i’ve got this test case passing! i’ll push my code and update you when it’s ready to take a look at.