diff options
author | Tim Hatch <tim@timhatch.com> | 2014-10-15 12:59:55 -0700 |
---|---|---|
committer | Tim Hatch <tim@timhatch.com> | 2014-10-15 12:59:55 -0700 |
commit | b51bfe6f6c9b69605117ef01bfaeab71e4dabf37 (patch) | |
tree | 2493d23c58030e3a708830b312691eccec2b684e /pygments/lexers/javascript.py | |
parent | 10be9bec8a7969a40d4fa3483b8317e0131b1715 (diff) | |
parent | d2fb0a7db3b59040820b4e839acb1d5b529ebe0f (diff) | |
download | pygments-b51bfe6f6c9b69605117ef01bfaeab71e4dabf37.tar.gz |
Merge with -main
Diffstat (limited to 'pygments/lexers/javascript.py')
-rw-r--r-- | pygments/lexers/javascript.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/pygments/lexers/javascript.py b/pygments/lexers/javascript.py index 481243ef..57870009 100644 --- a/pygments/lexers/javascript.py +++ b/pygments/lexers/javascript.py @@ -22,12 +22,11 @@ __all__ = ['JavascriptLexer', 'KalLexer', 'LiveScriptLexer', 'DartLexer', 'TypeScriptLexer', 'LassoLexer', 'ObjectiveJLexer', 'CoffeeScriptLexer', 'MaskLexer'] - -JS_IDENT_START = ('(?:[$_' + uni.Lu + uni.Ll + uni.Lt + uni.Lm + uni.Lo + uni.Nl - + ']|\\\\u[a-fA-F0-9]{4})') -JS_IDENT_PART = ('(?:[$_' + uni.Lu + uni.Ll + uni.Lt + uni.Lm + uni.Lo + uni.Nl - + uni.Mn + uni.Mc + uni.Nd + uni.Pc - + u'\u200c\u200d]|\\\\u[a-fA-F0-9]{4})') +JS_IDENT_START = ('(?:[$_' + uni.combine('Lu', 'Ll', 'Lt', 'Lm', 'Lo', 'Nl') + + ']|\\\\u[a-fA-F0-9]{4})') +JS_IDENT_PART = ('(?:[$_' + uni.combine('Lu', 'Ll', 'Lt', 'Lm', 'Lo', 'Nl', + 'Mn', 'Mc', 'Nd', 'Pc') + + u'\u200c\u200d]|\\\\u[a-fA-F0-9]{4})') JS_IDENT = JS_IDENT_START + '(?:' + JS_IDENT_PART + ')*' |