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:
Jonathan Kelley authored and GitHub committed 2024-04-03 15:27:36 -07:00
1 parent 46b0eeb12c
commit be99e29e5f
31 files changed
+464 -117

No files matched your search

+21 -4
View File
@@ -1,6 +1,9 @@
rsx! {
div { "hello world!" }
div { "hello world!", "goodbye world!" }
div {
"hello world!"
"goodbye world!"
}
// Simple div
div { "hello world!" }
@@ -8,18 +11,32 @@ rsx! {
// Compression with attributes
div { key: "{a}", class: "ban", style: "color: red" }
// But not too many attributes (3 max)
div {
id: "{a}",
class: "ban",
style: "color: red",
value: "{b}"
}
// Nested one level
div { div { "nested" } }
div {
div { "nested" }
}
// Nested two level
div {
div { h1 { "highly nested" } }
div {
h1 { "highly nested" }
}
}
// Anti-Nested two level
div {
div {
div { h1 { "highly nested" } }
div {
h1 { "highly nested" }
}
}
}