Support expressions in text! macro
This commit is contained in:
parent
105156542e
commit
9c81041cac
|
@ -139,7 +139,7 @@ macro_rules! text {
|
||||||
($t:expr) => {
|
($t:expr) => {
|
||||||
Box::new($crate::dom::TextNode::new($t))
|
Box::new($crate::dom::TextNode::new($t))
|
||||||
};
|
};
|
||||||
($format:tt, $($tail:tt),*) => {
|
($format:tt, $($tail:expr),*) => {
|
||||||
Box::new($crate::dom::TextNode::new(format!($format, $($tail),*)))
|
Box::new($crate::dom::TextNode::new(format!($format, $($tail),*)))
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue