support *.mjs as JavaScript

This commit is contained in:
Alan Hamlett 2018-02-06 21:36:10 -08:00
parent 85ef413ba8
commit 218141217a

View file

@ -37,7 +37,7 @@ class JavascriptLexer(RegexLexer):
name = 'JavaScript' name = 'JavaScript'
aliases = ['js', 'javascript'] aliases = ['js', 'javascript']
filenames = ['*.js', '*.jsm'] filenames = ['*.js', '*.jsm', '*.mjs']
mimetypes = ['application/javascript', 'application/x-javascript', mimetypes = ['application/javascript', 'application/x-javascript',
'text/x-javascript', 'text/javascript'] 'text/x-javascript', 'text/javascript']
@ -1035,7 +1035,6 @@ class CoffeeScriptLexer(RegexLexer):
filenames = ['*.coffee'] filenames = ['*.coffee']
mimetypes = ['text/coffeescript'] mimetypes = ['text/coffeescript']
_operator_re = ( _operator_re = (
r'\+\+|~|&&|\band\b|\bor\b|\bis\b|\bisnt\b|\bnot\b|\?|:|' r'\+\+|~|&&|\band\b|\bor\b|\bis\b|\bisnt\b|\bnot\b|\?|:|'
r'\|\||\\(?=\n)|' r'\|\||\\(?=\n)|'
@ -1464,6 +1463,7 @@ class EarlGreyLexer(RegexLexer):
], ],
} }
class JuttleLexer(RegexLexer): class JuttleLexer(RegexLexer):
""" """
For `Juttle`_ source code. For `Juttle`_ source code.