Highlight .pyj files as python

This commit is contained in:
Kovid Goyal 2018-05-08 22:32:34 +05:30
parent 324c223d54
commit 61e1b74434
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -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: