mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-23 12:43:08 +00:00
828cc502f1
* 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
38 lines
767 B
R
38 lines
767 B
R
rsx! {
|
|
// Does this work?
|
|
for i in b {
|
|
// Hey it works?
|
|
div {}
|
|
}
|
|
|
|
// Some ifchain
|
|
if a > 10 {
|
|
//
|
|
div {}
|
|
} else if a > 20 {
|
|
h1 {}
|
|
} else if a > 20 {
|
|
h1 {}
|
|
} else if a > 20 {
|
|
h1 {}
|
|
} else if a > 20 {
|
|
h1 {}
|
|
} else if a > 20 {
|
|
h1 {}
|
|
} else if a > 20 {
|
|
h1 {}
|
|
} else {
|
|
h3 {}
|
|
}
|
|
|
|
div {
|
|
class: "asdasd",
|
|
class: if expr { "asdasd" } else { "asdasd" },
|
|
class: if expr { "asdasd" },
|
|
class: if expr { "asdasd" } else if expr { "asdasd" } else { "asdasd" },
|
|
|
|
// comments?
|
|
class: if expr { "asdasd" } else if expr { "asdasd" } else { "asdasd" }, // comments!!?
|
|
// comments?
|
|
}
|
|
}
|