mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-31 06:18:17 +00:00
Highlight .pyj files as python
This commit is contained in:
parent
324c223d54
commit
61e1b74434
1 changed files with 3 additions and 0 deletions
|
|
@ -74,6 +74,9 @@ def initialize_highlighter(style='default'):
|
|||
|
||||
|
||||
def highlight_data(code, filename):
|
||||
base, ext = os.path.splitext(filename)
|
||||
if ext.lower() == '.pyj':
|
||||
filename = base + '.py'
|
||||
try:
|
||||
lexer = get_lexer_for_filename(filename, stripnl=False)
|
||||
except ClassNotFound:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue