summaryrefslogtreecommitdiff
path: root/pygments
diff options
context:
space:
mode:
authorMatthäus G. Chajdas <dev@anteru.net>2020-08-22 15:47:03 +0200
committerMatthäus G. Chajdas <dev@anteru.net>2020-08-22 15:47:03 +0200
commita57edeccc6b6325e4234f128aac349ee037bd9a4 (patch)
tree0da0e61e7c75409ff7c04b033a6b3e7fb5bb410c /pygments
parentf59621498e6dc479e4a40caca93f907529756f01 (diff)
downloadpygments-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.py5
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
-