Macro rtml::article

source ·
macro_rules! article {
    () => { ... };
    ( .$attr_left:ident = $value_left:expr $(,.$attr:ident = $value:expr)* $(,$inner:expr)* ) => { ... };
    ( $inner_left:expr $(,$inner:expr)*) => { ... };
}
Expand description

Example

use rtml::*;

assert_eq!(
    article!["This is an article."].render(),
    "<article>This is an article.</article>"
);

assert_eq!(
    article!["This is an article with a ", b!["bold"], " word."].render(),
    "<article>This is an article with a <b>bold</b> word.</article>"
);