leptosfmt icon indicating copy to clipboard operation
leptosfmt copied to clipboard

Leptosfmt move comments inside tags outside

Open ymo-4 opened this issue 1 year ago • 1 comments

leptosfmt move comments inside tags to the outside. But one by one each call, not all at once. This code snippet is taken from leptos book: 3.1 (at the bottom of the page in the CodeSandbox Source) so the question is should that comments be moved outside a tag at all?

./leptosfmt --version
leptosfmt 0.1.32

1

ymo-4 avatar Oct 31 '24 20:10 ymo-4

This is particularly bad for commented props. E.g.

<Button
    // p="value"
>
    Caption
</Button>

becomes

<Button>
    // p="value"
    Caption
</Button>

which can turn more deeply nested examples into something very confusing and hard to put right.

markalexander avatar Sep 23 '25 07:09 markalexander