rouge
rouge copied to clipboard
Fix python call syntax highlighting
Summary
Fixes an issue with the Python lexer where any identifier used before an opening paren ( would be highlighted as a function name. This led to inconsistent highlighting in the case of for loops, where one for would be rendered as a keyword while the other was rendered as a function name:
This pull request also addresses other edge cases for call expressions:
- distinguishes Exception classes from normal classes in a call expr context
- distinguishes Builtin calls from identically named method calls
Visual Before and After
| Before | After |
|---|---|