Files
dioxus/packages/autofmt/tests/samples/comments_attr_expr_blocks.rsx
T
Jonathan Kelley c73dc43233 fix(autofmt): add support for handling comments in various expression types (#5461)
* fix(autofmt): add support for handling comments in various expression types

* fmt
2026-04-07 16:19:00 -07:00

33 lines
594 B
R

rsx! {
Component {
label: {
let url = "https://example.com";
// comment before formatted tail expr
format!("{url}/docs")
},
}
Component {
status: {
// comment before branch
if is_ready() {
"ready"
} else {
"waiting"
}
},
}
div {
data_mode: {
// comment before block expr
if is_ready() {
"ready"
} else {
"waiting"
}
},
}
}