Closed mondeja closed 1 year ago
Hi, can you try again with the latest version0.1.15
? It includes some enhancements on std macro formatting.
The format!
macro is now properly formatted in the latest version.
Considering a macro in rust effectively maps a stream of tokens to a new stream of tokens, there is no straightforward way to support formatting arbitrary macros (as they can take a self-made syntax as input).
This library depends on prettyplease
for formatting rust source code. Feel free to make an issue there.
Currently, leptosfmt makes really strange changes to the "arguments" passed to macros that look like functions:
The problem becomes much worse when these macros that look like functions have complex code, for example:
I think it would make sense to ignore anything inside a macro that looks like a function.