Jonathan Kelley hai 1 ano
pai
achega
c5dfbd7913
Modificáronse 2 ficheiros con 5 adicións e 2 borrados
  1. 3 0
      examples/shorthand.rs
  2. 2 2
      packages/cli/src/cli/autoformat.rs

+ 3 - 0
examples/shorthand.rs

@@ -8,8 +8,11 @@ fn app(cx: Scope) -> Element {
     let a = 123;
     let b = 456;
     let c = 789;
+    let class = "class";
+    let id = "id";
 
     render! {
+        div { class, id }
         Component { a, b, c }
         Component { a, ..ComponentProps { a: 1, b: 2, c: 3 } }
     }

+ 2 - 2
packages/cli/src/cli/autoformat.rs

@@ -267,10 +267,10 @@ async fn test_auto_fmt() {
     let test_rsx = r#"
                     //
 
-                    rsx! {
+
 
                         div {}
-                    }
+
 
                     //
                     //