mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-19 06:54:58 +02:00
Highlight .pyj files as python
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user