summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2012-03-10 14:38:22 +0100
committerGeorg Brandl <georg@python.org>2012-03-10 14:38:22 +0100
commit7ff9fccafad1131cb706745fe7fbbfffefb3baef (patch)
tree671b1e84d1a4ac97c2e92dc11545898f8cb5ee1f
parent8cbeb3168e98cb67814c03db263a2c544dbc054b (diff)
downloadpygments-7ff9fccafad1131cb706745fe7fbbfffefb3baef.tar.gz
Style fixes, remove unneeded import.
-rw-r--r--pygments/lexers/compiled.py2
-rw-r--r--pygments/lexers/jvm.py9
-rw-r--r--pygments/lexers/templates.py17
3 files changed, 16 insertions, 12 deletions
diff --git a/pygments/lexers/compiled.py b/pygments/lexers/compiled.py
index 82b8c1e6..04077ec6 100644
--- a/pygments/lexers/compiled.py
+++ b/pygments/lexers/compiled.py
@@ -21,7 +21,7 @@ from pygments.scanner import Scanner
# backwards compatibility
from pygments.lexers.functional import OcamlLexer
-from pygments.lexers.jvm import JavaLexer, ScalaLexer, TeaLangLexer
+from pygments.lexers.jvm import JavaLexer, ScalaLexer
__all__ = ['CLexer', 'CppLexer', 'DLexer', 'DelphiLexer', 'ECLexer',
'DylanLexer', 'ObjectiveCLexer', 'FortranLexer', 'GLShaderLexer',
diff --git a/pygments/lexers/jvm.py b/pygments/lexers/jvm.py
index 8863e00d..6e3e103f 100644
--- a/pygments/lexers/jvm.py
+++ b/pygments/lexers/jvm.py
@@ -677,9 +677,13 @@ class ClojureLexer(RegexLexer):
],
}
+
class TeaLangLexer(RegexLexer):
"""
- For `Tea <http://teatrove.org/>`_ source code. Only used within a TeaTemplateLexer.
+ For `Tea <http://teatrove.org/>`_ source code. Only used within a
+ TeaTemplateLexer.
+
+ *New in Pygments 1.5.*
"""
flags = re.MULTILINE | re.DOTALL
@@ -721,5 +725,4 @@ class TeaLangLexer(RegexLexer):
'import': [
(r'[a-zA-Z0-9_.]+\*?', Name.Namespace, '#pop')
],
- }
-
+ }
diff --git a/pygments/lexers/templates.py b/pygments/lexers/templates.py
index 043336db..4b7c4281 100644
--- a/pygments/lexers/templates.py
+++ b/pygments/lexers/templates.py
@@ -14,7 +14,8 @@ import re
from pygments.lexers.web import \
PhpLexer, HtmlLexer, XmlLexer, JavascriptLexer, CssLexer
from pygments.lexers.agile import PythonLexer, PerlLexer
-from pygments.lexers.compiled import JavaLexer, TeaLangLexer
+from pygments.lexers.compiled import JavaLexer
+from pygments.lexers.jvm import TeaLangLexer
from pygments.lexer import Lexer, DelegatingLexer, RegexLexer, bygroups, \
include, using, this
from pygments.token import Error, Punctuation, \
@@ -33,11 +34,10 @@ __all__ = ['HtmlPhpLexer', 'XmlPhpLexer', 'CssPhpLexer',
'MyghtyCssLexer', 'MyghtyJavascriptLexer', 'MasonLexer', 'MakoLexer',
'MakoHtmlLexer', 'MakoXmlLexer', 'MakoJavascriptLexer',
'MakoCssLexer', 'JspLexer', 'CheetahLexer', 'CheetahHtmlLexer',
- 'CheetahXmlLexer', 'CheetahJavascriptLexer',
- 'EvoqueLexer', 'EvoqueHtmlLexer', 'EvoqueXmlLexer',
- 'ColdfusionLexer', 'ColdfusionHtmlLexer',
- 'VelocityLexer', 'VelocityHtmlLexer', 'VelocityXmlLexer',
- 'SspLexer', 'TeaTemplateLexer']
+ 'CheetahXmlLexer', 'CheetahJavascriptLexer', 'EvoqueLexer',
+ 'EvoqueHtmlLexer', 'EvoqueXmlLexer', 'ColdfusionLexer',
+ 'ColdfusionHtmlLexer', 'VelocityLexer', 'VelocityHtmlLexer',
+ 'VelocityXmlLexer', 'SspLexer', 'TeaTemplateLexer']
class ErbLexer(Lexer):
@@ -1607,7 +1607,7 @@ class TeaTemplateRootLexer(RegexLexer):
class TeaTemplateLexer(DelegatingLexer):
"""
- Lexer for Tea Templates. http://teatrove.org
+ Lexer for `Tea Templates <http://teatrove.org/>`_.
*New in Pygments 1.5.*
"""
@@ -1617,7 +1617,8 @@ class TeaTemplateLexer(DelegatingLexer):
mimetypes = ['text/x-tea']
def __init__(self, **options):
- super(TeaTemplateLexer, self).__init__(XmlLexer, TeaTemplateRootLexer, **options)
+ super(TeaTemplateLexer, self).__init__(XmlLexer,
+ TeaTemplateRootLexer, **options)
def analyse_text(text):
rv = TeaLangLexer.analyse_text(text) - 0.01