raw.rs 475 B

123456789101112131415161718192021
  1. use html_parser::Dom;
  2. #[test]
  3. fn raw_attribute() {
  4. let html = r#"
  5. <div>
  6. <div unrecognizedattribute="asd">hello world!</div>
  7. </div>
  8. "#
  9. .trim();
  10. let dom = Dom::parse(html).unwrap();
  11. let body = rsx_rosetta::rsx_from_html(&dom);
  12. let out = dioxus_autofmt::write_block_out(body).unwrap();
  13. let expected = r#"
  14. div { div { "unrecognizedattribute": "asd", "hello world!" } }"#;
  15. pretty_assertions::assert_eq!(&out, &expected);
  16. }