use rstml_to_string_macro::html_ide; // Using this parser, one can write docs and link html tags to them. // if this macro would be independent, it would be nicer to have docs in // separate crate. pub mod docs { /// Element has open and close tags, content and attributes. pub fn element() {} } #[test] fn test() { let nightly_unqoted = " Hello world with spaces "; let stable_unqoted = "Hello world with spaces"; let unquoted_text = if cfg!(rstml_signal_nightly) { nightly_unqoted } else { stable_unqoted }; let world = "planet"; assert_eq!( html_ide! { "Example"
<>
"1"
Hello world with spaces
"3"
}, format!( r#" Example
1
{}
3
"#, unquoted_text ) .split('\n') .map(|line| line.trim()) .collect::>() .join("") ); }