diff options
author | blackbird <devnull@localhost> | 2006-12-12 15:25:49 +0100 |
---|---|---|
committer | blackbird <devnull@localhost> | 2006-12-12 15:25:49 +0100 |
commit | a47422d95839661b8f782b14d57e499d2fafb8bd (patch) | |
tree | 2f92c322a9005ac447646d810d45c638f986ce0a /pygments/lexers | |
parent | 7ad01f5f354faf3e37617b1d3084e0a309141463 (diff) | |
download | pygments-a47422d95839661b8f782b14d57e499d2fafb8bd.tar.gz |
[svn] added more mimetypes and extensions to the xml lexer as requested in #153
Diffstat (limited to 'pygments/lexers')
-rw-r--r-- | pygments/lexers/_mapping.py | 2 | ||||
-rw-r--r-- | pygments/lexers/web.py | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/pygments/lexers/_mapping.py b/pygments/lexers/_mapping.py index 2d386a66..86bb3976 100644 --- a/pygments/lexers/_mapping.py +++ b/pygments/lexers/_mapping.py @@ -69,7 +69,7 @@ LEXERS = { 'VbNetLexer': ('pygments.lexers.dotnet', 'VB.net', ('vb.net', 'vbnet'), ('*.vb', '*.bas'), ('text/x-vbnet', 'text/x-vba')), 'XmlDjangoLexer': ('pygments.lexers.templates', 'XML+Django/Jinja', ('xml+django', 'xml+jinja'), (), ()), 'XmlErbLexer': ('pygments.lexers.templates', 'XML+Ruby', ('xml+erb', 'xml+ruby'), (), ()), - 'XmlLexer': ('pygments.lexers.web', 'XML', ('xml',), ('*.xml',), ('text/xml', 'application/xml', 'image/svg+xml')), + 'XmlLexer': ('pygments.lexers.web', 'XML', ('xml',), ('*.xml', '*.xsl', '*.rss'), ('text/xml', 'application/xml', 'image/svg+xml', 'application/rss+xml', 'application/atom+xml', 'application/xsl+xml', 'application/xslt+xml')), 'XmlPhpLexer': ('pygments.lexers.templates', 'XML+PHP', ('xml+php',), (), ()), 'XmlSmartyLexer': ('pygments.lexers.templates', 'XML+Smarty', ('xml+smarty',), (), ()) } diff --git a/pygments/lexers/web.py b/pygments/lexers/web.py index 28320308..9c83cd6b 100644 --- a/pygments/lexers/web.py +++ b/pygments/lexers/web.py @@ -327,8 +327,10 @@ class XmlLexer(RegexLexer): name = 'XML' aliases = ['xml'] - filenames = ['*.xml'] - mimetypes = ['text/xml', 'application/xml', 'image/svg+xml'] + filenames = ['*.xml', '*.xsl', '*.rss'] + mimetypes = ['text/xml', 'application/xml', 'image/svg+xml', + 'application/rss+xml', 'application/atom+xml', + 'application/xsl+xml', 'application/xslt+xml'] tokens = { 'root': [ |