bram209 / leptosfmt

A formatter for the leptos view! macro
Apache License 2.0
274 stars 30 forks source link

feat: respect single empty line #36

Closed bram209 closed 1 year ago

bram209 commented 1 year ago

resolves #27

seblj commented 1 year ago

Btw: This makes it so it does not respect no newlines when the closing tag is on a line by itself @bram209 :

            <div>
                <div
                    class="foo"
                    class="foo"
                    class="foo"
                    class="foo"
                    class="foo"
                    class="foo"
                    class="foo"
                >
                    <i class="bi-google"></i>
                    "Sign in with google"
                </div>
            </div>

formats to

            <div>
                <div
                    class="foo"
                    class="foo"
                    class="foo"
                    class="foo"
                    class="foo"
                    class="foo"
                    class="foo"
                >
+                                                                                                                                                                                                                                   
                    <i class="bi-google"></i>
                    "Sign in with google"
                </div>
            </div>

I am trying to look into this as well, but can't figure out how to fix the issue yet

bram209 commented 1 year ago

ah check, I think I know the issue, sorry for the inconvenience

seblj commented 1 year ago

No problem at all! Thanks for looking into it :)

bram209 commented 1 year ago

Should be fixed now @seblj

seblj commented 1 year ago

Works perfectly! Thank you!