summaryrefslogtreecommitdiff
path: root/pygments/lexers
diff options
context:
space:
mode:
Diffstat (limited to 'pygments/lexers')
-rw-r--r--pygments/lexers/postgres.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pygments/lexers/postgres.py b/pygments/lexers/postgres.py
index f85b4b01..908beed8 100644
--- a/pygments/lexers/postgres.py
+++ b/pygments/lexers/postgres.py
@@ -215,7 +215,7 @@ class PostgresConsoleLexer(Lexer):
break
# Identify a shell prompt in case of psql commandline example
- if line.startswith('$'):
+ if line.startswith('$') and not curcode:
lexer = get_lexer_by_name('console', **self.options)
for x in lexer.get_tokens_unprocessed(line):
yield x