rouge icon indicating copy to clipboard operation
rouge copied to clipboard

The MATLAB lexer produces many false positives due to the builtin name handling

Open KaesetorteGithub opened this issue 3 years ago • 0 comments

Name of the lexer MATLAB

Additional context When using the MATLAB lexer, all builtin names are treated as keywords. This does not represent the "expected" hightlighting standards from working in the MATLAB editor and makes looking at code highlighted by this lexer confusing.

Due to the large ammount of builtins in MATLAB and their sometimes very generic names like "result" or "stack" and the fact that MATLAB does not reserve these words, there are also a lot of false positives where e.g. a variablename can get hightlighted when it shouldnt be.

I would suggest either a way to disable the highlighting of builtins to match the behaviour of the MATLAB editor more closely, or a MATLAB-lite lexer which does not include the builtins.

KaesetorteGithub avatar Mar 22 '22 17:03 KaesetorteGithub