Skip to content

Commit

Permalink
JuttleLexer: Fix duplicate 'juttle' occurance in lexer aliases.
Browse files Browse the repository at this point in the history
The output from pygments.lexers.get_all_lexers() would contain
'juttle' twice in the aliases section for the Juttle lexer entry.

This could be reproduced using:

>>> from pygments.lexers import get_all_lexers
>>> lexers = get_all_lexers()
>>> {alias[0]: alias[1] for alias in lexers}.get('Juttle')
('juttle', 'juttle')

This patch fixes the duplicate entry and generates the associated
_mapping.py file.

Fixes: pygments#1604
  • Loading branch information
sumanthvrao committed Nov 17, 2020
1 parent abbf911 commit c99000d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pygments/lexers/_mapping.py
Expand Up @@ -234,7 +234,7 @@
'JspLexer': ('pygments.lexers.templates', 'Java Server Page', ('jsp',), ('*.jsp',), ('application/x-jsp',)),
'JuliaConsoleLexer': ('pygments.lexers.julia', 'Julia console', ('jlcon',), (), ()),
'JuliaLexer': ('pygments.lexers.julia', 'Julia', ('julia', 'jl'), ('*.jl',), ('text/x-julia', 'application/x-julia')),
'JuttleLexer': ('pygments.lexers.javascript', 'Juttle', ('juttle', 'juttle'), ('*.juttle',), ('application/juttle', 'application/x-juttle', 'text/x-juttle', 'text/juttle')),
'JuttleLexer': ('pygments.lexers.javascript', 'Juttle', ('juttle',), ('*.juttle',), ('application/juttle', 'application/x-juttle', 'text/x-juttle', 'text/juttle')),
'KalLexer': ('pygments.lexers.javascript', 'Kal', ('kal',), ('*.kal',), ('text/kal', 'application/kal')),
'KconfigLexer': ('pygments.lexers.configs', 'Kconfig', ('kconfig', 'menuconfig', 'linux-config', 'kernel-config'), ('Kconfig*', '*Config.in*', 'external.in*', 'standard-modules.in'), ('text/x-kconfig',)),
'KernelLogLexer': ('pygments.lexers.textfmts', 'Kernel log', ('kmsg', 'dmesg'), ('*.kmsg', '*.dmesg'), ()),
Expand Down
2 changes: 1 addition & 1 deletion pygments/lexers/javascript.py
Expand Up @@ -1481,7 +1481,7 @@ class JuttleLexer(RegexLexer):
"""

name = 'Juttle'
aliases = ['juttle', 'juttle']
aliases = ['juttle']
filenames = ['*.juttle']
mimetypes = ['application/juttle', 'application/x-juttle',
'text/x-juttle', 'text/juttle']
Expand Down

0 comments on commit c99000d

Please sign in to comment.