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

Java: The word "to" is highlighted, but it should not be #5693

Open
crummy opened this issue Dec 9, 2024 · 0 comments
Open

Java: The word "to" is highlighted, but it should not be #5693

crummy opened this issue Dec 9, 2024 · 0 comments

Comments

@crummy
Copy link

crummy commented Dec 9, 2024

Describe the bug

In Java, using "to" as a variable name will highlight it as if it was a keyword.

Expected Behavior

"to" should not highlight blue in the demo editor. Here are a list of Java keywords:

https://en.wikipedia.org/wiki/List_of_Java_keywords

Current Behavior

https://mkslanc.github.io/ace-playground/?value=Ly9zYW1wbGVzL2hlbGxvIHdvcmxkCgovLyBFYXNpZXN0IHdheSB0byBydW4gQUNFIGVkaXRvciBpbiBjb250YWluZXIgd2l0aCBpZD0iZXhhbXBsZSIKYWNlLmVkaXQoImV4YW1wbGUiLCB7CiAgICB0aGVtZTogImFjZS90aGVtZS90ZXh0bWF0ZSIsCiAgICBtb2RlOiAiYWNlL21vZGUvamF2YSIsCiAgICB2YWx1ZTogImNvbnNvbGUubG9nKCdIZWxsbyB3b3JsZCcpOyIKfSk7XDBcMDxzY3JpcHQgc3JjPSJodHRwczovL3d3dy51bnBrZy5jb20vYWNlLWJ1aWxkc0BsYXRlc3Qvc3JjLW5vY29uZmxpY3QvYWNlLmpzIj48L3NjcmlwdD4KPGRpdiBpZD0nZXhhbXBsZScgc3R5bGU9ImhlaWdodDogMTAwJSI%2BPC9kaXY%2B#hello-world

image

Reproduction Steps

  1. Open demo editor
  2. Change language mode to "ace/mode/java"
  3. Write some code that includes the word to e.g var to = "to"

Possible Solution

I rolled back to 1.30.0 and cannot reproduce it, but I can on 1.31.0. I think this is the change that introduces this:

https://github.com/ajaxorg/ace/pull/5343/files#diff-138cd3514dd27442d8b8aa99dad9b2f5d749ad669e5a0fff48474deaf3689e77R24

Additional Information/Context

No response

Ace Version / Browser / OS / Keyboard layout

1.31.0 till latest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants