summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2019-11-25 06:21:54 +0100
committerGeorg Brandl <georg@python.org>2019-11-25 06:21:54 +0100
commitbb9e8694dde642886e980e297c5f382018e0d812 (patch)
tree230d97deb9cfc198f0e5a7bfca1b402160ef6e17
parent9ca90d60b125775a688f72b84d9a33e3f9141e3c (diff)
downloadpygments-git-bb9e8694dde642886e980e297c5f382018e0d812.tar.gz
resource, robotframework: stop hogging the .txt extension
-rw-r--r--pygments/lexers/_mapping.py4
-rw-r--r--pygments/lexers/resource.py2
-rw-r--r--pygments/lexers/robotframework.py2
-rw-r--r--pygments/lexers/special.py1
4 files changed, 5 insertions, 4 deletions
diff --git a/pygments/lexers/_mapping.py b/pygments/lexers/_mapping.py
index 664ed47b..b6aed44f 100644
--- a/pygments/lexers/_mapping.py
+++ b/pygments/lexers/_mapping.py
@@ -369,12 +369,12 @@ LEXERS = {
'RedLexer': ('pygments.lexers.rebol', 'Red', ('red', 'red/system'), ('*.red', '*.reds'), ('text/x-red', 'text/x-red-system')),
'RedcodeLexer': ('pygments.lexers.esoteric', 'Redcode', ('redcode',), ('*.cw',), ()),
'RegeditLexer': ('pygments.lexers.configs', 'reg', ('registry',), ('*.reg',), ('text/x-windows-registry',)),
- 'ResourceLexer': ('pygments.lexers.resource', 'ResourceBundle', ('resource', 'resourcebundle'), ('*.txt',), ()),
+ 'ResourceLexer': ('pygments.lexers.resource', 'ResourceBundle', ('resource', 'resourcebundle'), (), ()),
'RexxLexer': ('pygments.lexers.scripting', 'Rexx', ('rexx', 'arexx'), ('*.rexx', '*.rex', '*.rx', '*.arexx'), ('text/x-rexx',)),
'RhtmlLexer': ('pygments.lexers.templates', 'RHTML', ('rhtml', 'html+erb', 'html+ruby'), ('*.rhtml',), ('text/html+ruby',)),
'RoboconfGraphLexer': ('pygments.lexers.roboconf', 'Roboconf Graph', ('roboconf-graph',), ('*.graph',), ()),
'RoboconfInstancesLexer': ('pygments.lexers.roboconf', 'Roboconf Instances', ('roboconf-instances',), ('*.instances',), ()),
- 'RobotFrameworkLexer': ('pygments.lexers.robotframework', 'RobotFramework', ('robotframework',), ('*.txt', '*.robot'), ('text/x-robotframework',)),
+ 'RobotFrameworkLexer': ('pygments.lexers.robotframework', 'RobotFramework', ('robotframework',), ('*.robot',), ('text/x-robotframework',)),
'RqlLexer': ('pygments.lexers.sql', 'RQL', ('rql',), ('*.rql',), ('text/x-rql',)),
'RslLexer': ('pygments.lexers.dsls', 'RSL', ('rsl',), ('*.rsl',), ('text/rsl',)),
'RstLexer': ('pygments.lexers.markup', 'reStructuredText', ('rst', 'rest', 'restructuredtext'), ('*.rst', '*.rest'), ('text/x-rst', 'text/prs.fallenstein.rst')),
diff --git a/pygments/lexers/resource.py b/pygments/lexers/resource.py
index 6cc88b95..ccd4e5f6 100644
--- a/pygments/lexers/resource.py
+++ b/pygments/lexers/resource.py
@@ -26,7 +26,7 @@ class ResourceLexer(RegexLexer):
"""
name = 'ResourceBundle'
aliases = ['resource', 'resourcebundle']
- filenames = ['*.txt']
+ filenames = []
_types = (':table', ':array', ':string', ':bin', ':import', ':intvector',
':int', ':alias')
diff --git a/pygments/lexers/robotframework.py b/pygments/lexers/robotframework.py
index 1288da8d..642c90c5 100644
--- a/pygments/lexers/robotframework.py
+++ b/pygments/lexers/robotframework.py
@@ -64,7 +64,7 @@ class RobotFrameworkLexer(Lexer):
"""
name = 'RobotFramework'
aliases = ['robotframework']
- filenames = ['*.txt', '*.robot']
+ filenames = ['*.robot']
mimetypes = ['text/x-robotframework']
def __init__(self, **options):
diff --git a/pygments/lexers/special.py b/pygments/lexers/special.py
index 1b3e9724..4016c594 100644
--- a/pygments/lexers/special.py
+++ b/pygments/lexers/special.py
@@ -35,6 +35,7 @@ class TextLexer(Lexer):
def analyse_text(text):
return TextLexer.priority
+
_ttype_cache = {}
line_re = re.compile(b'.*?\n')