Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formatter changing file format from dos -> unix #80

Closed
nikhilraojl opened this issue Sep 19, 2023 · 0 comments · Fixed by #81
Closed

Formatter changing file format from dos -> unix #80

nikhilraojl opened this issue Sep 19, 2023 · 0 comments · Fixed by #81

Comments

@nikhilraojl
Copy link
Contributor

I am running windows and found leptosfmt is changing file format from dos(CRLF) -> unix(LF).
Snippet below. Ran command leptosfmt example.rs

use leptos::*;

#[component]
fn App() -> impl IntoView {
    view! { 
        <h1>"Iteration"</h1> 
        <h1>"UnIteration"</h1> 
    }
}


fn main() {
    leptos::mount_to_body(|| view! { <App/> })
}

Before:
image

After:
image

One interesting thing, if the view! macro had only one component the file format is not being changed. Snippet below

use leptos::*;

#[component]
fn App() -> impl IntoView {
    view! { 
        <h1>"Iteration"</h1> 
    }
}


fn main() {
    leptos::mount_to_body(|| view! { <App/> })
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant