Skip to content
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

Fix highlighting of hex numbers with separators #81039

Conversation

MewPurPur
Copy link
Contributor

image

^ Fix this

Copy link
Member

@adamscott adamscott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

It works!

@dalexeev
Copy link
Member

I noticed this in #73203 but forgot to fix it, thank you. Can you please edit line 330 by the way:

-    !(str[j] == '.' && (prev_is_digit || (!prev_is_binary_op && (j > 0 && (str[j - 1] == '-' || str[j - 1] == '+' || str[j - 1] == '~'))))) &&
+    !(str[j] == '.' && (prev_is_digit || (!prev_is_binary_op && (j > 0 && (str[j - 1] == '_' || str[j - 1] == '-' || str[j - 1] == '+' || str[j - 1] == '~'))))) &&

This is for . after _ (for example 1_.2) is highlighted in number color.

@MewPurPur MewPurPur force-pushed the fix-hex-number-highlighting-after-separator branch from 1b0d399 to d394624 Compare August 28, 2023 06:53
@MewPurPur
Copy link
Contributor Author

Doned

@akien-mga akien-mga merged commit fc37fd7 into godotengine:master Aug 28, 2023
@akien-mga
Copy link
Member

Thanks!

@MewPurPur MewPurPur deleted the fix-hex-number-highlighting-after-separator branch August 28, 2023 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants