mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-23 12:43:08 +00:00
be99e29e5f
* fix: fmt unterminated if, be more aggressive with line splits * Fix: Handle long exprs in for/if statements
23 lines
487 B
Rust
23 lines
487 B
Rust
use html_parser::Dom;
|
|
|
|
#[test]
|
|
fn raw_attribute() {
|
|
let html = r#"
|
|
<div>
|
|
<div unrecognizedattribute="asd">hello world!</div>
|
|
</div>
|
|
"#
|
|
.trim();
|
|
|
|
let dom = Dom::parse(html).unwrap();
|
|
|
|
let body = rsx_rosetta::rsx_from_html(&dom);
|
|
|
|
let out = dioxus_autofmt::write_block_out(body).unwrap();
|
|
|
|
let expected = r#"
|
|
div {
|
|
div { "unrecognizedattribute": "asd", "hello world!" }
|
|
}"#;
|
|
pretty_assertions::assert_eq!(&out, &expected);
|
|
}
|