@@ -486,7 +487,7 @@ mod tests {
{
let a = 12;
- view! { cx,
+ view! {
// wow, a span
{a}
}
@@ -558,20 +559,20 @@ mod tests {
fn multiple() {
let source = indoc! {r#"
fn main() {
- view! { cx ,
"hello"
};
- view! { cx ,
"hello"
};
+ view! {
"hello"
};
+ view! {
"hello"
};
}
"#};
let result = format_file_source(source, &Default::default()).unwrap();
insta::assert_snapshot!(result, @r#"
fn main() {
- view! { cx,
+ view! {
"hello"
};
- view! { cx,
+ view! {
"hello"
@@ -584,14 +585,14 @@ mod tests {
fn with_special_characters() {
let source = indoc! {r#"
fn main() {
- view! { cx ,
"hello²💣"
};
+ view! {
"hello²💣"
};
}
"#};
let result = format_file_source(source, &Default::default()).unwrap();
insta::assert_snapshot!(result, @r#"
fn main() {
- view! { cx,
+ view! {
"hello²💣"
@@ -605,7 +606,7 @@ mod tests {
let source = indoc! {r#"
#[component]
fn test2(cx: Scope) -> impl IntoView {
- let x = view! { cx,
Hello
};
+ let x = view! {
Hello
};
}
"#};
@@ -613,7 +614,7 @@ mod tests {
insta::assert_snapshot!(result, @r###"
#[component]
fn test2(cx: Scope) -> impl IntoView {
- let x = view! { cx,
+ let x = view! {
Hello
@@ -636,12 +637,12 @@ mod tests {
fn Component(cx: Scope, val: ExampleEnum) -> impl IntoView {
match val {
ExampleEnum::ValueOneWithAReallyLongName =>
- view! { cx,
+ view! {
}.into_view(cx),
- ExampleEnum::ValueTwoWithAReallyLongName => view! { cx,
+ ExampleEnum::ValueTwoWithAReallyLongName => view! {
@@ -663,12 +664,12 @@ mod tests {
fn Component(cx: Scope, val: ExampleEnum) -> impl IntoView {
match val {
ExampleEnum::ValueOneWithAReallyLongName =>
- view! { cx,
+ view! {
}.into_view(cx),
- ExampleEnum::ValueTwoWithAReallyLongName => view! { cx,
+ ExampleEnum::ValueTwoWithAReallyLongName => view! {
@@ -710,7 +711,7 @@ mod tests {
fn indent_with_tabs() {
let source = indoc! {"
fn main() {
- \tview! { cx,
+ \tview! {
@@ -730,7 +731,7 @@ mod tests {
let expected = indoc! {"
fn main() {
- \tview! { cx,
+ \tview! {
\t\t
@@ -745,7 +746,7 @@ mod tests {
fn indent_with_tabs_including_code_blocks() {
let source = indoc! {"
fn main() {
- \tview! { cx,
+ \tview! {
@@ -805,7 +806,7 @@ mod tests {
let expected = indoc! {"
fn main() {
- \tview! { cx,
+ \tview! {
\t\t
@@ -820,7 +821,7 @@ mod tests {
fn auto_detect_spaces() {
let source = indoc! {"
fn main() {
- \u{0020}view! { cx,
+ \u{0020}view! {
@@ -840,7 +841,7 @@ mod tests {
let expected = indoc! {"
fn main() {
- \u{0020}view! { cx,
+ \u{0020}view! {
\u{0020}\u{0020}
\u{0020}\u{0020}\u{0020}
Example
\u{0020}\u{0020}