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

Ruby wrong syntax highlighting #2038

Closed
red0xff opened this issue Jan 5, 2019 · 2 comments
Closed

Ruby wrong syntax highlighting #2038

red0xff opened this issue Jan 5, 2019 · 2 comments

Comments

@red0xff
Copy link

red0xff commented Jan 5, 2019

Geany wrongly colors sequences starting with a percentage sign (%).
Program that illustrates some issues:

n = 1337;
w = r = 5
x = n%w + 1; # "%w " is recognised as the beginning of an array of words, like %w[ ... ]
y = n%r ;   # "%r " is recognised as the beginning of a regular expression
string = %= this is a string = ;  # this one is correctly colored
n %= w;  # this is the most important issue, the expression is equivalent to n = n % w; but it's recognised like the previous line
print x%r  # %r is also recognised like a beginning of regex, but in this case, the %= of the previous line is still not terminated (no equal sign encoutered).

Tested on Geany 1.33 on Linux (Debian).

@elextr
Copy link
Member

elextr commented Jan 5, 2019

The highlighting is done by lexers that are part of the Scintilla editing component Geany uses, which is a separate project. Test highlighting problems in the Scite reference editor for Scintilla if you can, report them directly to Scintilla (NB Geany uses version 3.10 not version 4 when you report, but that should not affect the Ruby lexer). Geany devs are not Ruby experts, better for you to directly communicate with the lexer maintainer. Please post the issue number here for tracking.

@elextr
Copy link
Member

elextr commented Apr 6, 2019

Closed as no Scintilla bug has been raised.

@elextr elextr closed this as completed Apr 6, 2019
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