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

Wrong syntax highlighting for Groovy GStrings when interpolating values #318

Open
FranzMartyn opened this issue Aug 26, 2024 · 5 comments
Open

Comments

@FranzMartyn
Copy link

FranzMartyn commented Aug 26, 2024

Describe the bug
Sometimes, codewars' code runner gets the syntax highlighting for GStrings wrong when they contain interpolated values

Code runner does this:

image

Expected behavior

instead of this (example from Intellij Idea):

image

To Reproduce

  • Create a Kumite in Groovy
  • Create variables and interpolate them into a String

Kumite: https://www.codewars.com/kumite/66cc60e3d8acf6782ef5515c

Browser

  • OS: Windows 10 Pro, Version 22H2, Build 19045.4780
  • Browser: Chrome
  • Version: 128.0.6613.84 (Official Build) (64-Bit)
@hobovsky
Copy link

IIRC, syntax highlighting is done with capabilities of the CodeMirror 5 editor, and Codewars does not have any special control over it. Ideally this problem would be resolved by submitting a PR to CodeMirror, so Codewars could later use the fixed version.

Problematic part can be that CW uses CodeMirror 5, which is not the latest version. I do not know if it still accepts fixes and improvements.

@FranzMartyn
Copy link
Author

Are there any plans on updating to a later version of CodeMirror or is there no need for it?

@hobovsky
Copy link

I am not aware of any.

@FranzMartyn
Copy link
Author

Seems like it's fixes now

codemirror/legacy-modes@2675b58

@hobovsky
Copy link

I will check what has to be done to make sure that CW uses the fixed mode.

@FranzMartyn FranzMartyn reopened this Aug 29, 2024
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