eric6/ThirdParty/Pygments/pygments/lexers/typoscript.py

changeset 7547
21b0534faebc
parent 6942
2602857055c5
child 7701
25f42e208e08
equal deleted inserted replaced
7546:bf5f777260a6 7547:21b0534faebc
12 Lexer that highlights markers, constants and registers within css. 12 Lexer that highlights markers, constants and registers within css.
13 13
14 `TypoScriptHtmlDataLexer` 14 `TypoScriptHtmlDataLexer`
15 Lexer that highlights markers, constants and registers within html tags. 15 Lexer that highlights markers, constants and registers within html tags.
16 16
17 :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. 17 :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS.
18 :license: BSD, see LICENSE for details. 18 :license: BSD, see LICENSE for details.
19 """ 19 """
20 20
21 import re 21 import re
22 22
106 .. versionadded:: 2.2 106 .. versionadded:: 2.2
107 """ 107 """
108 108
109 name = 'TypoScript' 109 name = 'TypoScript'
110 aliases = ['typoscript'] 110 aliases = ['typoscript']
111 filenames = ['*.ts', '*.txt'] 111 filenames = ['*.typoscript']
112 mimetypes = ['text/x-typoscript'] 112 mimetypes = ['text/x-typoscript']
113 113
114 flags = re.DOTALL | re.MULTILINE 114 flags = re.DOTALL | re.MULTILINE
115
116 # Slightly higher than TypeScript (which is 0).
117 priority = 0.1
118 115
119 tokens = { 116 tokens = {
120 'root': [ 117 'root': [
121 include('comment'), 118 include('comment'),
122 include('constant'), 119 include('constant'),
218 ], 215 ],
219 'other': [ 216 'other': [
220 (r'[\w"\-!/&;]+', Text), 217 (r'[\w"\-!/&;]+', Text),
221 ], 218 ],
222 } 219 }
223
224 def analyse_text(text):
225 if '<INCLUDE_TYPOSCRIPT:' in text:
226 return 1.0

eric ide

mercurial