* add new autofmt sample * Feat: implement rustfmt::skip support for rsx * generally improve error handling with better expect messages * wip: nested rsx formatting and expression formatting * nested rsx formatting works * collapse autofmt crate * cast indent through macros * use proper whitespace * no more eating comments! * Use proper error handling
33 lines
488 B
R
33 lines
488 B
R
/// dont format this component
|
|
#[rustfmt::skip]
|
|
#[component]
|
|
fn SidebarSection() -> Element {
|
|
rsx! {
|
|
div {
|
|
"hi" div {} div {}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// dont format this component
|
|
#[component]
|
|
fn SidebarSection() -> Element {
|
|
// format this
|
|
rsx! {
|
|
div { "hi" }
|
|
}
|
|
|
|
// and this
|
|
rsx! {
|
|
div { "hi" div {} div {} }
|
|
}
|
|
|
|
// but not this
|
|
#[rustfmt::skip]
|
|
rsx! {
|
|
div {
|
|
"hi" div {} div {}
|
|
}
|
|
}
|
|
}
|