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
2.1.0 problem with extending the lexers dictionary #6497
Comments
Thank you for reporting. |
Thank you, I will test the next release. We can close this issue for now. |
…ghting Fix #6497: custom lexers fails highlighting when syntax error
Fixed by #6502. |
Verified the fix with version 2.1.2 Great, thanks! |
@jmckenna Good to know. BTW, since v0.6, we've provided |
So would the syntax be something like the following:
where MapFileLexer() is the instance and 'mapfile' is the alias. Is this syntax correct for >2.1.0 ? |
Yes, it working now. So it would be nice if possible:
Since 2.1, Sphinx provides |
With 2.1.2, if I try:
I get the same error:
But it works if I call it by instance instead:
|
Oh, sorry. I did not describe the API in detail. A lexer registered as a class raises an error on syntax error. On the other hand, A lexer registered as an instance ignores syntax error. You can choose either way. |
We extend the lexers dictionary (this has worked since around 2008) such as:
which since the 2.1.0 release causes these warnings and doesn't trigger the highlighting:
The text was updated successfully, but these errors were encountered: