Open SV-97 opened 1 year ago
Since this changes the behaviour of the formatted code it should probably be considered a bug?
Yes, it should. I will see if I can take a look later this week. For now, indeed you can extract the multi line string out of the macro.
I'm also having the same issues and am eagerly looking for a solution.
I have a multiline string embedded in my code that gets modified by leptosfmt. Something like this:
that gets turned into something like this
Importantly the two strings aren't the same because of the prepended spaces and they render differently. The only workaround I could think of (short of extracting the string out of the view macro) was to use indoc and do something like
which renders correctly - but isn't the best solution imo (and still formats a bit weirdly).
Since this changes the behaviour of the formatted code it should probably be considered a bug?
I couldn't find something similar to
#[rustfmt::skip]
that I could use to simply skip the formatting of the string - does leptosfmt already support such a feature?