Skip to content

Comments

Fix Ruby syntax highlighting for predefined variables#3778

Merged
JoeKar merged 1 commit intomicro-editor:masterfrom
Andriamanitra:ruby-predefined-variables
Jun 20, 2025
Merged

Fix Ruby syntax highlighting for predefined variables#3778
JoeKar merged 1 commit intomicro-editor:masterfrom
Andriamanitra:ruby-predefined-variables

Conversation

@Andriamanitra
Copy link
Contributor

Ruby has a bunch of predefined variables that use special characters like quotes and backticks which completely break syntax highlighting. Adding rules like constant: "[$]\"" would not fix the issue because the string highlighting would still take priority, so I had to work around the issue by using a group with start (which contains the part to highlight) and end (which always matches).

Current syntax highlighting:
screenshot of problems

With this PR applied:
screenshot with problems fixed

These short names are rarely seen in serious code but they're extremely common in code golf so it would be nice to get this fixed.

@JoeKar JoeKar merged commit 29dc892 into micro-editor:master Jun 20, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants