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

changeset 7547
21b0534faebc
parent 6942
2602857055c5
child 7701
25f42e208e08
equal deleted inserted replaced
7546:bf5f777260a6 7547:21b0534faebc
3 pygments.lexers.html 3 pygments.lexers.html
4 ~~~~~~~~~~~~~~~~~~~~ 4 ~~~~~~~~~~~~~~~~~~~~
5 5
6 Lexers for HTML, XML and related markup. 6 Lexers for HTML, XML and related markup.
7 7
8 :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. 8 :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS.
9 :license: BSD, see LICENSE for details. 9 :license: BSD, see LICENSE for details.
10 """ 10 """
11 11
12 import re 12 import re
13 13
242 name = 'XSLT' 242 name = 'XSLT'
243 aliases = ['xslt'] 243 aliases = ['xslt']
244 filenames = ['*.xsl', '*.xslt', '*.xpl'] # xpl is XProc 244 filenames = ['*.xsl', '*.xslt', '*.xpl'] # xpl is XProc
245 mimetypes = ['application/xsl+xml', 'application/xslt+xml'] 245 mimetypes = ['application/xsl+xml', 'application/xslt+xml']
246 246
247 EXTRA_KEYWORDS = set(( 247 EXTRA_KEYWORDS = {
248 'apply-imports', 'apply-templates', 'attribute', 248 'apply-imports', 'apply-templates', 'attribute',
249 'attribute-set', 'call-template', 'choose', 'comment', 249 'attribute-set', 'call-template', 'choose', 'comment',
250 'copy', 'copy-of', 'decimal-format', 'element', 'fallback', 250 'copy', 'copy-of', 'decimal-format', 'element', 'fallback',
251 'for-each', 'if', 'import', 'include', 'key', 'message', 251 'for-each', 'if', 'import', 'include', 'key', 'message',
252 'namespace-alias', 'number', 'otherwise', 'output', 'param', 252 'namespace-alias', 'number', 'otherwise', 'output', 'param',
253 'preserve-space', 'processing-instruction', 'sort', 253 'preserve-space', 'processing-instruction', 'sort',
254 'strip-space', 'stylesheet', 'template', 'text', 'transform', 254 'strip-space', 'stylesheet', 'template', 'text', 'transform',
255 'value-of', 'variable', 'when', 'with-param' 255 'value-of', 'variable', 'when', 'with-param'
256 )) 256 }
257 257
258 def get_tokens_unprocessed(self, text): 258 def get_tokens_unprocessed(self, text):
259 for index, token, value in XmlLexer.get_tokens_unprocessed(self, text): 259 for index, token, value in XmlLexer.get_tokens_unprocessed(self, text):
260 m = re.match('</?xsl:([^>]*)/?>?', value) 260 m = re.match('</?xsl:([^>]*)/?>?', value)
261 261

eric ide

mercurial