diff options
author | Georg Brandl <georg@python.org> | 2019-11-24 18:35:49 +0100 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2019-11-24 18:35:49 +0100 |
commit | 7ae5ebc3f79f9c5d3f57b5a50de3074b40ef236d (patch) | |
tree | 7fbb0f6c00ae84a97c54e22efc6e34158c876ebe | |
parent | ec982e5028aa14d9e6de09bcc4240db0a144a1b6 (diff) | |
download | pygments-git-7ae5ebc3f79f9c5d3f57b5a50de3074b40ef236d.tar.gz |
Python lexer: accept .jy filenames
Fixes #976
-rw-r--r-- | CHANGES | 1 | ||||
-rw-r--r-- | pygments/lexers/_mapping.py | 2 | ||||
-rw-r--r-- | pygments/lexers/python.py | 2 |
3 files changed, 4 insertions, 1 deletions
@@ -47,6 +47,7 @@ Version 2.5.0 - Dockerfile: accept ``FROM ... AS`` syntax - Velocity: support silent reference syntax - Agda: fix lambda highlighting +- Python: recognize ``.jy`` filenames (#976) - Image formatter: actually respect ``line_number_separator`` option diff --git a/pygments/lexers/_mapping.py b/pygments/lexers/_mapping.py index 6c0dd3d4..664ed47b 100644 --- a/pygments/lexers/_mapping.py +++ b/pygments/lexers/_mapping.py @@ -346,7 +346,7 @@ LEXERS = { 'Python2Lexer': ('pygments.lexers.python', 'Python 2.x', ('python2', 'py2'), (), ('text/x-python2', 'application/x-python2')), 'Python2TracebackLexer': ('pygments.lexers.python', 'Python 2.x Traceback', ('py2tb',), ('*.py2tb',), ('text/x-python2-traceback',)), 'PythonConsoleLexer': ('pygments.lexers.python', 'Python console session', ('pycon',), (), ('text/x-python-doctest',)), - 'PythonLexer': ('pygments.lexers.python', 'Python', ('python', 'py', 'sage', 'python3', 'py3'), ('*.py', '*.pyw', '*.sage', '*.sc', 'SConstruct', 'SConscript', '*.bzl', 'BUCK', 'BUILD', 'BUILD.bazel', 'WORKSPACE', '*.tac'), ('text/x-python', 'application/x-python', 'text/x-python3', 'application/x-python3')), + 'PythonLexer': ('pygments.lexers.python', 'Python', ('python', 'py', 'sage', 'python3', 'py3'), ('*.py', '*.pyw', '*.jy', '*.sage', '*.sc', 'SConstruct', 'SConscript', '*.bzl', 'BUCK', 'BUILD', 'BUILD.bazel', 'WORKSPACE', '*.tac'), ('text/x-python', 'application/x-python', 'text/x-python3', 'application/x-python3')), 'PythonTracebackLexer': ('pygments.lexers.python', 'Python Traceback', ('pytb', 'py3tb'), ('*.pytb', '*.py3tb'), ('text/x-python-traceback', 'text/x-python3-traceback')), 'QBasicLexer': ('pygments.lexers.basic', 'QBasic', ('qbasic', 'basic'), ('*.BAS', '*.bas'), ('text/basic',)), 'QVToLexer': ('pygments.lexers.qvt', 'QVTO', ('qvto', 'qvt'), ('*.qvto',), ()), diff --git a/pygments/lexers/python.py b/pygments/lexers/python.py index c2fe0341..52f1755c 100644 --- a/pygments/lexers/python.py +++ b/pygments/lexers/python.py @@ -263,6 +263,8 @@ class PythonLexer(RegexLexer): filenames = [ '*.py', '*.pyw', + # Jython + '*.jy', # Sage '*.sage', # SCons |