diff options
| author | Matthäus G. Chajdas <dev@anteru.net> | 2020-08-22 15:47:03 +0200 |
|---|---|---|
| committer | Matthäus G. Chajdas <dev@anteru.net> | 2020-08-22 15:47:03 +0200 |
| commit | a57edeccc6b6325e4234f128aac349ee037bd9a4 (patch) | |
| tree | 0da0e61e7c75409ff7c04b033a6b3e7fb5bb410c /pygments | |
| parent | f59621498e6dc479e4a40caca93f907529756f01 (diff) | |
| download | pygments-git-a57edeccc6b6325e4234f128aac349ee037bd9a4.tar.gz | |
Manually merge PR#1497.
This is a manual merge as we don't want to pull in the documentation
change as part of this fix for a cleaner history.
Diffstat (limited to 'pygments')
| -rw-r--r-- | pygments/lexers/shell.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/pygments/lexers/shell.py b/pygments/lexers/shell.py index bc55a52a..3b5218b8 100644 --- a/pygments/lexers/shell.py +++ b/pygments/lexers/shell.py @@ -172,7 +172,7 @@ class ShellSessionBaseLexer(Lexer): curcode += line backslash_continuation = curcode.endswith('\\\n') continue - + venv_match = self._venv.match(line) if venv_match: venv = venv_match.group(1) @@ -773,7 +773,7 @@ class PowerShellSessionLexer(ShellSessionBaseLexer): mimetypes = [] _innerLexerCls = PowerShellLexer - _ps1rgx = re.compile(r'^((?:\[[^]]+\]: )?PS [^>]+> ?)(.*\n?)') + _ps1rgx = re.compile(r'^((?:\[[^]]+\]: )?PS[^>]*> ?)(.*\n?)') _ps2 = '>> ' @@ -907,4 +907,3 @@ class ExeclineLexer(RegexLexer): def analyse_text(text): if shebang_matches(text, r'execlineb'): return 1 - |
