utkarshkukreti / markup.rs

A blazing fast, type-safe template engine for Rust.
Apache License 2.0
350 stars 14 forks source link

Support dynamic element names #11

Closed utkarshkukreti closed 2 years ago

utkarshkukreti commented 3 years ago

Currently there's no way to turn:

let name = "foo";

into

<foo></foo>

without messing with markup::raw().

Looking for suggestions for syntax to use for this; I can't think of any elegant one right now.

ZaneHannanAU commented 3 years ago

syntax could be ({name})[whatever="value", etc] {}, or perhaps enum struct thing ...

utkarshkukreti commented 3 years ago

That's interesting. It could also be angle brackets: <{name}>[whatever ...] {}.

miguelcaravantes commented 3 years ago

This feature would be nice