skip.rsx 532 B

123456789101112131415161718192021222324252627282930313233343536
  1. /// dont format this component
  2. #[rustfmt::skip]
  3. #[component]
  4. fn SidebarSection() -> Element {
  5. rsx! {
  6. div {
  7. "hi" div {} div {}
  8. }
  9. }
  10. }
  11. /// dont format this component
  12. #[component]
  13. fn SidebarSection() -> Element {
  14. // format this
  15. rsx! {
  16. div { "hi" }
  17. }
  18. // and this
  19. rsx! {
  20. div {
  21. "hi"
  22. div {}
  23. div {}
  24. }
  25. }
  26. // but not this
  27. #[rustfmt::skip]
  28. rsx! {
  29. div {
  30. "hi" div {} div {}
  31. }
  32. }
  33. }