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/shell.py | |
parent | 11dac32db5db1166b8d55dc85bc16d2085936c9a (diff) | |
download | pygments-git-cffc5df62c258ca39fc7474f7197f2df33ab014f.tar.gz |
all: move often-used "line_re" to pygments.lexer
Diffstat (limited to 'pygments/lexers/shell.py')
-rw-r--r-- | pygments/lexers/shell.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/pygments/lexers/shell.py b/pygments/lexers/shell.py index acd78d97..be74a040 100644 --- a/pygments/lexers/shell.py +++ b/pygments/lexers/shell.py @@ -11,7 +11,7 @@ import re from pygments.lexer import Lexer, RegexLexer, do_insertions, bygroups, \ - include, default, this, using, words + include, default, this, using, words, line_re from pygments.token import Punctuation, \ Text, Comment, Operator, Keyword, Name, String, Number, Generic from pygments.util import shebang_matches @@ -21,8 +21,6 @@ __all__ = ['BashLexer', 'BashSessionLexer', 'TcshLexer', 'BatchLexer', 'PowerShellSessionLexer', 'TcshSessionLexer', 'FishShellLexer', 'ExeclineLexer'] -line_re = re.compile('.*?\n') - class BashLexer(RegexLexer): """ |