summaryrefslogtreecommitdiff
path: root/pygments/lexers/typoscript.py
diff options
context:
space:
mode:
authorAnteru <bitbucket@ca.sh13.net>2018-11-24 16:37:35 +0000
committerAnteru <bitbucket@ca.sh13.net>2018-11-24 16:37:35 +0000
commitc85d52dfad2b5b1f9783e88ac52d893e30f034d2 (patch)
treeeb3ef2aa70d2fbb7a1a307042038405929aa9650 /pygments/lexers/typoscript.py
parentee4cc2ef1bc96d44e93c1ad881e7b533bc83b8ae (diff)
parentd13cb73dc075a689f17e453a392429eb880b2eca (diff)
downloadpygments-git-c85d52dfad2b5b1f9783e88ac52d893e30f034d2.tar.gz
Merged in Reedbeta/pygments-main/hlsl-lexer (pull request #675)
Add HLSL lexer Approved-by: Anteru <bitbucket@ca.sh13.net>
Diffstat (limited to 'pygments/lexers/typoscript.py')
-rw-r--r--pygments/lexers/typoscript.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/pygments/lexers/typoscript.py b/pygments/lexers/typoscript.py
index 407847ed..e358af07 100644
--- a/pygments/lexers/typoscript.py
+++ b/pygments/lexers/typoscript.py
@@ -14,17 +14,15 @@
`TypoScriptHtmlDataLexer`
Lexer that highlights markers, constants and registers within html tags.
- :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import RegexLexer, include, bygroups, using
-from pygments.token import Keyword, Text, Comment, Name, String, Number, \
+from pygments.token import Text, Comment, Name, String, Number, \
Operator, Punctuation
-from pygments.lexer import DelegatingLexer
-from pygments.lexers.web import HtmlLexer, CssLexer
__all__ = ['TypoScriptLexer', 'TypoScriptCssDataLexer', 'TypoScriptHtmlDataLexer']
@@ -115,6 +113,9 @@ class TypoScriptLexer(RegexLexer):
flags = re.DOTALL | re.MULTILINE
+ # Slightly higher than TypeScript (which is 0).
+ priority = 0.1
+
tokens = {
'root': [
include('comment'),
@@ -168,14 +169,14 @@ class TypoScriptLexer(RegexLexer):
'whitespace': [
(r'\s+', Text),
],
- 'html':[
+ 'html': [
(r'<\S[^\n>]*>', using(TypoScriptHtmlDataLexer)),
(r'&[^;\n]*;', String),
(r'(_CSS_DEFAULT_STYLE)(\s*)(\()(?s)(.*(?=\n\)))',
- bygroups(Name.Class, Text, String.Symbol, using(TypoScriptCssDataLexer))),
+ bygroups(Name.Class, Text, String.Symbol, using(TypoScriptCssDataLexer))),
],
'literal': [
- (r'0x[0-9A-Fa-f]+t?',Number.Hex),
+ (r'0x[0-9A-Fa-f]+t?', Number.Hex),
# (r'[0-9]*\.[0-9]+([eE][0-9]+)?[fd]?\s*(?:[^=])', Number.Float),
(r'[0-9]+', Number.Integer),
(r'(###\w+###)', Name.Constant),