diff options
author | Georg Brandl <georg@python.org> | 2011-07-09 11:30:07 +0200 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2011-07-09 11:30:07 +0200 |
commit | f6119495ed8645b050b94cec9bdd0c6f66afcc68 (patch) | |
tree | 2e6ce7d11782dffe5074a5d7f4f49006dbb92bc1 | |
parent | 8a0082870fc8373552cffcfc8c6768f8b991a00c (diff) | |
parent | 97bfcb1ddabe82a6463ad9be134b2f946617f9dc (diff) | |
download | pygments-f6119495ed8645b050b94cec9bdd0c6f66afcc68.tar.gz |
Merged in spig/pygments-main (pull request #7)
-rw-r--r-- | pygments/lexers/_mapping.py | 2 | ||||
-rw-r--r-- | pygments/lexers/web.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/pygments/lexers/_mapping.py b/pygments/lexers/_mapping.py index 598b0c2e..deecc1b4 100644 --- a/pygments/lexers/_mapping.py +++ b/pygments/lexers/_mapping.py @@ -114,7 +114,7 @@ LEXERS = { 'JavascriptDjangoLexer': ('pygments.lexers.templates', 'JavaScript+Django/Jinja', ('js+django', 'javascript+django', 'js+jinja', 'javascript+jinja'), (), ('application/x-javascript+django', 'application/x-javascript+jinja', 'text/x-javascript+django', 'text/x-javascript+jinja', 'text/javascript+django', 'text/javascript+jinja')), 'JavascriptErbLexer': ('pygments.lexers.templates', 'JavaScript+Ruby', ('js+erb', 'javascript+erb', 'js+ruby', 'javascript+ruby'), (), ('application/x-javascript+ruby', 'text/x-javascript+ruby', 'text/javascript+ruby')), 'JavascriptGenshiLexer': ('pygments.lexers.templates', 'JavaScript+Genshi Text', ('js+genshitext', 'js+genshi', 'javascript+genshitext', 'javascript+genshi'), (), ('application/x-javascript+genshi', 'text/x-javascript+genshi', 'text/javascript+genshi')), - 'JavascriptLexer': ('pygments.lexers.web', 'JavaScript', ('js', 'javascript'), ('*.js',), ('application/javascript', 'application/x-javascript', 'text/x-javascript', 'text/javascript')), + 'JavascriptLexer': ('pygments.lexers.web', 'JavaScript', ('js', 'javascript'), ('*.js', '*.json'), ('application/javascript', 'application/x-javascript', 'text/x-javascript', 'text/javascript', 'application/json')), 'JavascriptPhpLexer': ('pygments.lexers.templates', 'JavaScript+PHP', ('js+php', 'javascript+php'), (), ('application/x-javascript+php', 'text/x-javascript+php', 'text/javascript+php')), 'JavascriptSmartyLexer': ('pygments.lexers.templates', 'JavaScript+Smarty', ('js+smarty', 'javascript+smarty'), (), ('application/x-javascript+smarty', 'text/x-javascript+smarty', 'text/javascript+smarty')), 'JspLexer': ('pygments.lexers.templates', 'Java Server Page', ('jsp',), ('*.jsp',), ('application/x-jsp',)), diff --git a/pygments/lexers/web.py b/pygments/lexers/web.py index 5ffacc8b..4ff427a4 100644 --- a/pygments/lexers/web.py +++ b/pygments/lexers/web.py @@ -36,9 +36,9 @@ class JavascriptLexer(RegexLexer): name = 'JavaScript' aliases = ['js', 'javascript'] - filenames = ['*.js'] + filenames = ['*.js', '*.json'] mimetypes = ['application/javascript', 'application/x-javascript', - 'text/x-javascript', 'text/javascript'] + 'text/x-javascript', 'text/javascript', 'application/json'] flags = re.DOTALL tokens = { |