Highlight .pyj files as python
This commit is contained in:
parent
324c223d54
commit
61e1b74434
@ -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…
x
Reference in New Issue
Block a user