-
-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Formatter silently breaks with leading minus sign in multiline statement #717
Comments
Oh my God, that's it!!! I had a file that stopped getting formatted, and I couldn't for the life of me figure out what in my config was causing this to happen...! 😆 🤣 😢 |
Correctly detecting this situation might be approaching the limits of this formatter, but I might be able to make it continue formatting even if there's a problem.... |
I expected this to be difficult because the textmate tokenizer doesn't preserve a lot of context across lines, but it was actually a simple index-out-of-bounds error because the This will be fixed in the next release. |
Oh perfect! Happy it turned out to be “simple”! Thanks!
…On Sun, Nov 3, 2024 at 11:28 AM David Kincaid ***@***.***> wrote:
I expected this to be difficult because the textmate tokenizer doesn't
preserve a lot of context across lines, but it was actually a simple
index-out-of-bounds error because the - is the 0th token and token n-1
doesn't exist.
This will be fixed in the next release.
—
Reply to this email directly, view it on GitHub
<#717 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAACIVYA6CYUSSNDRUDE4SDZ6Y6IBAVCNFSM6AAAAABOI7DYBSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINJTGQ4DMMRWGE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Godot version
v4.3.stable.official [77dcf97d8]
VS Code version
1.93.1
Godot Tools VS Code extension version
2.1.0
System information
Windows 11
Issue description
If one uses a multiline statement and one of the lines has a leading minus sign, the formatter silently breaks.
Steps to reproduce
The following examples will break the formatter.
The text was updated successfully, but these errors were encountered: