Closed spencewenski closed 2 months ago
In leptos-0.7 we can (need to?) provide a custom "app shell". This typically looks something like:
pub fn shell(options: LeptosOptions) -> impl IntoView { view! { <!DOCTYPE html> <html lang="en"></html> } }
See also many of the examples, e.g. the hackernews_axum example.
The issue I'm seeing is leptosfmt is adding a space (`) after the<!DOCTYPE html>. This then causescargo fmt --all --checkto fail due to the trailing whitespace. E.g, the example above becomes (note the trailing `):
leptosfmt
`) after the
. This then causes
to fail due to the trailing whitespace. E.g, the example above becomes (note the trailing
If I try running cargo fmt after leptosfmt, then leptosfmt --check fails because it expects the trailing whitespace.
cargo fmt
leptosfmt --check
Context
In leptos-0.7 we can (need to?) provide a custom "app shell". This typically looks something like:
See also many of the examples, e.g. the hackernews_axum example.
Bug
The issue I'm seeing is
leptosfmt
is adding a space (`) after the
<!DOCTYPE html>. This then causes
cargo fmt --all --checkto fail due to the trailing whitespace. E.g, the example above becomes (note the trailing
`):If I try running
cargo fmt
afterleptosfmt
, thenleptosfmt --check
fails because it expects the trailing whitespace.