Fixes to autofmt, make it more aggressive (#2230)
* fix: fmt unterminated if, be more aggressive with line splits * Fix: Handle long exprs in for/if statements
This commit is contained in:
1 parent
46b0eeb12c
commit
be99e29e5f
31 files changed
+464
-117
No files matched your search
@@ -0,0 +1,62 @@
|
||||
#[component]
|
||||
fn SomePassthru(class: String, id: String, children: Element) -> Element {
|
||||
rsx! {
|
||||
div {
|
||||
// Comments
|
||||
class,
|
||||
"hello world"
|
||||
}
|
||||
h1 { class, "hello world" }
|
||||
|
||||
h1 { class, {children} }
|
||||
|
||||
h1 { class, id, {children} }
|
||||
|
||||
h1 { class,
|
||||
"hello world"
|
||||
{children}
|
||||
}
|
||||
|
||||
h1 { id,
|
||||
"hello world"
|
||||
{children}
|
||||
}
|
||||
|
||||
Other { class, children }
|
||||
|
||||
Other { class,
|
||||
"hello world"
|
||||
{children}
|
||||
}
|
||||
|
||||
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"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user