taplo icon indicating copy to clipboard operation
taplo copied to clipboard

[bug]EvenBetterToml: Wrong formatting with square brackets in comments

Open Nodd opened this issue 1 year ago • 2 comments

This minimal example gets reformated wrong :

table = [
    # [TODO]
    "I",
]

becomes

table = [
    # [TODO]    "I",
]

This has the very bad effect of commenting the table value !

From my tests it comes from the square brackets around TODO in the comment. If I change them to parenthesis the behavior is correct.

I have the VSCode extension v0.19.2 with default configuration.

Nodd avatar Feb 07 '24 10:02 Nodd

Can you reproduce it with latest cli? The VSCode extension is a bit outside due to publish issue.

https://github.com/tamasfe/taplo/issues/542#issuecomment-1926487532

JounQin avatar Feb 07 '24 10:02 JounQin

I can try, but I can't find the executables, the links on https://taplo.tamasfe.dev/cli/installation/binary.html yield not found and there is only source code available on https://github.com/tamasfe/taplo/releases/tag/release-taplo-0.13.0. Do I have to compile it myself ?

Edit : Oh sorry, I didn't see your link at first

Nodd avatar Feb 07 '24 13:02 Nodd