mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-26 22:20:19 +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
62 lines
1.1 KiB
R
62 lines
1.1 KiB
R
rsx! {
|
|
div {
|
|
// Comments
|
|
class: "asdasd",
|
|
"hello world"
|
|
}
|
|
div {
|
|
// My comment here 1
|
|
// My comment here 2
|
|
// My comment here 3
|
|
// My comment here 4
|
|
class: "asdasd",
|
|
|
|
// Comment here
|
|
onclick: move |_| {
|
|
let a = 10;
|
|
let b = 40;
|
|
let c = 50;
|
|
},
|
|
|
|
// my comment
|
|
|
|
// This here
|
|
"hi"
|
|
}
|
|
|
|
// Comment head
|
|
div { class: "asd", "Jon" }
|
|
|
|
// Comment head
|
|
div {
|
|
// Collapse
|
|
class: "asd",
|
|
"Jon"
|
|
}
|
|
|
|
// comments inline
|
|
div { // inline
|
|
// Collapse
|
|
class: "asd", // super inline
|
|
class: "asd", // super inline
|
|
"Jon" // all the inline
|
|
// Comments at the end too
|
|
}
|
|
|
|
// please dont eat me 1
|
|
div { // please dont eat me 2
|
|
// please dont eat me 3
|
|
}
|
|
|
|
// please dont eat me 1
|
|
div { // please dont eat me 2
|
|
// please dont eat me 3
|
|
abc: 123,
|
|
}
|
|
|
|
// please dont eat me 1
|
|
div {
|
|
// please dont eat me 3
|
|
abc: 123,
|
|
}
|
|
}
|