diff options
author | Georg Brandl <georg@python.org> | 2022-10-27 08:29:41 +0200 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2022-10-27 11:58:29 +0200 |
commit | cffc5df62c258ca39fc7474f7197f2df33ab014f (patch) | |
tree | aff878367d037e4f7d4d032fadf32f0845e103b3 /pygments/lexers/javascript.py | |
parent | 11dac32db5db1166b8d55dc85bc16d2085936c9a (diff) | |
download | pygments-git-cffc5df62c258ca39fc7474f7197f2df33ab014f.tar.gz |
all: move often-used "line_re" to pygments.lexer
Diffstat (limited to 'pygments/lexers/javascript.py')
-rw-r--r-- | pygments/lexers/javascript.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/pygments/lexers/javascript.py b/pygments/lexers/javascript.py index 864a9043..eed71f95 100644 --- a/pygments/lexers/javascript.py +++ b/pygments/lexers/javascript.py @@ -11,7 +11,7 @@ import re from pygments.lexer import bygroups, combined, default, do_insertions, include, \ - inherit, Lexer, RegexLexer, this, using, words + inherit, Lexer, RegexLexer, this, using, words, line_re from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ Number, Punctuation, Other, Generic, Whitespace from pygments.util import get_bool_opt @@ -29,7 +29,6 @@ JS_IDENT_PART = ('(?:[$' + uni.combine('Lu', 'Ll', 'Lt', 'Lm', 'Lo', 'Nl', '\u200c\u200d]|\\\\u[a-fA-F0-9]{4})') JS_IDENT = JS_IDENT_START + '(?:' + JS_IDENT_PART + ')*' -line_re = re.compile('.*?\n') class JavascriptLexer(RegexLexer): """ |