summaryrefslogtreecommitdiff
path: root/pygments/lexers/postgres.py
diff options
context:
space:
mode:
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>2011-04-13 09:49:02 +0100
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>2011-04-13 09:49:02 +0100
commit98c745ccf4f94a129dae7f53a7db59277e0a06df (patch)
tree43802232e3e74e15c64cb7d2a9c7bc745437b39d /pygments/lexers/postgres.py
parent4f8f83415ac1a0e6c932e26a460fd83fa04e9811 (diff)
downloadpygments-98c745ccf4f94a129dae7f53a7db59277e0a06df.tar.gz
Detect multiline strings and error output in psql session
Diffstat (limited to 'pygments/lexers/postgres.py')
-rw-r--r--pygments/lexers/postgres.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/pygments/lexers/postgres.py b/pygments/lexers/postgres.py
index 21185b30..501cc166 100644
--- a/pygments/lexers/postgres.py
+++ b/pygments/lexers/postgres.py
@@ -166,7 +166,7 @@ class PsqlRegexLexer(PostgresLexer):
(r"[^\s]+", String.Symbol),
]
-re_prompt = re.compile(r'^(\S.*?)??[=\-\(][#>]')
+re_prompt = re.compile(r'^(\S.*?)??[=\-\(\$\'\"][#>]')
re_psql_command = re.compile(r'\s*\\')
re_end_command = re.compile(r';\s*(--.*?)?$')
re_psql_command = re.compile(r'(\s*)(\\.+?)(\s+)$')
@@ -260,9 +260,7 @@ class PostgresConsoleLexer(Lexer):
out_token = Generic.Error
yield (mmsg.start(1), Generic.Strong, mmsg.group(1))
yield (mmsg.start(2), out_token, mmsg.group(2))
- elif re_charhint.match(line):
- yield (0, out_token, line)
else:
- yield (0, Generic.Output, line)
+ yield (0, out_token, line)