From 7f0a0904460b2890ea3e28c92098c1bf6cee8955 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Thu, 24 Dec 2020 16:52:35 +0100 Subject: Remove the alias for the RawTokenLexer. RawTokenLexer was broken until 2.7.4, so it seems pretty much unused, and it led to tracebacks when the "raw" alias was used from some markup that allows specifying a language alias. We'll still keep the class for special usage as intended. --- CHANGES | 3 +++ pygments/lexers/_mapping.py | 2 +- pygments/lexers/special.py | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index d68df87a..ee2e8785 100644 --- a/CHANGES +++ b/CHANGES @@ -11,6 +11,9 @@ Version 2.8.0 ------------- (not released yet) +- Removed "raw" alias from RawTokenLexer, so that it cannot be + selected by alias. + Version 2.7.4 ------------- diff --git a/pygments/lexers/_mapping.py b/pygments/lexers/_mapping.py index 8360ec4e..2e74b0c1 100644 --- a/pygments/lexers/_mapping.py +++ b/pygments/lexers/_mapping.py @@ -376,7 +376,7 @@ LEXERS = { 'RagelLexer': ('pygments.lexers.parsers', 'Ragel', ('ragel',), (), ()), 'RagelObjectiveCLexer': ('pygments.lexers.parsers', 'Ragel in Objective C Host', ('ragel-objc',), ('*.rl',), ()), 'RagelRubyLexer': ('pygments.lexers.parsers', 'Ragel in Ruby Host', ('ragel-ruby', 'ragel-rb'), ('*.rl',), ()), - 'RawTokenLexer': ('pygments.lexers.special', 'Raw token data', ('raw',), (), ('application/x-pygments-tokens',)), + 'RawTokenLexer': ('pygments.lexers.special', 'Raw token data', (), (), ('application/x-pygments-tokens',)), 'RdLexer': ('pygments.lexers.r', 'Rd', ('rd',), ('*.Rd',), ('text/x-r-doc',)), 'ReasonLexer': ('pygments.lexers.ml', 'ReasonML', ('reason', 'reasonml'), ('*.re', '*.rei'), ('text/x-reasonml',)), 'RebolLexer': ('pygments.lexers.rebol', 'REBOL', ('rebol',), ('*.r', '*.r3', '*.reb'), ('text/x-rebol',)), diff --git a/pygments/lexers/special.py b/pygments/lexers/special.py index 84a924d9..29ce8fcc 100644 --- a/pygments/lexers/special.py +++ b/pygments/lexers/special.py @@ -55,7 +55,7 @@ class RawTokenLexer(Lexer): the given compression algorithm before lexing (default: ``""``). """ name = 'Raw token data' - aliases = ['raw'] + aliases = [] filenames = [] mimetypes = ['application/x-pygments-tokens'] -- cgit v1.2.1