Support expressions in text! macro

This commit is contained in:
Jonathan Kingston 2019-05-20 14:08:12 +01:00 committed by Bodil Stokke
parent 105156542e
commit 9c81041cac
1 changed files with 1 additions and 1 deletions

View File

@ -139,7 +139,7 @@ macro_rules! text {
($t:expr) => {
Box::new($crate::dom::TextNode::new($t))
};
($format:tt, $($tail:tt),*) => {
($format:tt, $($tail:expr),*) => {
Box::new($crate::dom::TextNode::new(format!($format, $($tail),*)))
};
}