rouge icon indicating copy to clipboard operation
rouge copied to clipboard

Haxe: static extensions break highlighting

Open MoritzBrueckner opened this issue 4 years ago • 1 comments

Name of the lexer Haxe

Code sample

package my.package;

using my.package.SomeStaticExtension;

class Test {}

Additional context Removing the line starting with using solves the issue. Unfortunately I can't provide a rouge.jneen.net link as the generated link itself seems broken and a random example opens instead. But you can try the above code yourself on the website, it will result in Server Error: A server error occurred while processing your request. You can also see the problem in a real example on Gitlab: this file isn't highlighted at all while other files in the same directory (like this one) are correctly highlighted.

Thanks!

MoritzBrueckner avatar Jun 29 '21 15:06 MoritzBrueckner

I have never worked with Ruby and I have no idea of how the language works, but could it be that the state :namespace is missing in the Haxe lexer? It is referenced here when the using keyword is used, but I can't find it in the lexer file (other lexers seem to define it, like here for example). It was defined in one other closed Haxe PR here.

This could explain why there is an actual error when using the above example.

MoritzBrueckner avatar Jun 29 '21 18:06 MoritzBrueckner

This issue has been automatically marked as stale because it has not had any activity for more than a year. It will be closed if no additional activity occurs within the next 14 days. If you would like this issue to remain open, please reply and let us know if the issue is still reproducible.

stale[bot] avatar Aug 13 '22 08:08 stale[bot]

If you would like this issue to remain open, please reply and let us know if the issue is still reproducible.

The issue is still reproducible, although GitLab seems to have switched to a different code highlighter so the file linked above now works there. On rouge.jneen.net the above code snippet still leads to a server error.

MoritzBrueckner avatar Aug 13 '22 11:08 MoritzBrueckner