mrml 6.0.0

Rust implementation of MJML renderer
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#[cfg(test)]
mod tests {
    use crate::prelude::print::Printable;

    #[test]
    fn empty() {
        let mut item = crate::mj_text::MjText::default();
        item.attributes
            .insert("href".to_string(), Some("http://localhost".into()));
        item.children
            .push(crate::text::Text::from(String::from("test")).into());
        assert_eq!(
            "<mj-text href=\"http://localhost\">test</mj-text>",
            item.print_dense().unwrap()
        );
    }
}