From 575f92d2d4944b261a36d2360b92d031892f9edb Mon Sep 17 00:00:00 2001 From: Jonathan Kelley Date: Tue, 5 Jul 2022 18:23:30 -0400 Subject: [PATCH] chore: update readme and tests for autofmt --- packages/autofmt/README.md | 2 +- packages/autofmt/tests/samples/simple.rsx | 7 +++++++ packages/autofmt/tests/wrong.rs | 16 ---------------- 3 files changed, 8 insertions(+), 17 deletions(-) diff --git a/packages/autofmt/README.md b/packages/autofmt/README.md index d15d2a7bc..f1c425c56 100644 --- a/packages/autofmt/README.md +++ b/packages/autofmt/README.md @@ -7,7 +7,7 @@ This crate formats rsx! by parsing call bodies and pretty-printing them back out # Todo: Sorted roughly in order of what's possible -- [ ] Oneline rsx! calls - blocker because this wrecks formatting +- [x] Oneline rsx! calls - blocker because this wrecks formatting - [ ] Nested RSX calls (important) - unnecessary but desirable - [ ] RSX edits overstepping each other - [ ] Collapse components and elements under syntax - diff --git a/packages/autofmt/tests/samples/simple.rsx b/packages/autofmt/tests/samples/simple.rsx index 62a70cfaf..a60d69f2a 100644 --- a/packages/autofmt/tests/samples/simple.rsx +++ b/packages/autofmt/tests/samples/simple.rsx @@ -34,4 +34,11 @@ rsx! { // Components Component { ..Props {} } + + // multiline + div { + class: "asdaskjdhaskjdjaslkdjlakdjaslkdjaslkd asdaskjdhaskjdjaslkdjlakdjaslkdjaslkdasdaskjdhaskjdjaslkdjlakdjaslkdjaslkd", + multiple: "asd", + "hi" + } } diff --git a/packages/autofmt/tests/wrong.rs b/packages/autofmt/tests/wrong.rs index 4cf339e59..f15849573 100644 --- a/packages/autofmt/tests/wrong.rs +++ b/packages/autofmt/tests/wrong.rs @@ -12,19 +12,3 @@ macro_rules! twoway { } twoway!("comments" => comments); - -// rsx! { -// div { class: "asdasd", "hello world" } -// h1 { -// // Important handler -// onclick: move |_| { -// let a = 10; -// }, - -// div { "hello" } - -// // Important handler -// "Goodbye world" -// } -// Component {} -// }