From 1e4841a12e712be36d7cef5a897ef162ff600fa3 Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Sun, 10 Apr 2011 09:59:13 +0100 Subject: More tolerant psql prompt Recognize stuff as "user@host db=>" too. --- pygments/lexers/postgres.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pygments/lexers/postgres.py') diff --git a/pygments/lexers/postgres.py b/pygments/lexers/postgres.py index 2418a009..2f4dad72 100644 --- a/pygments/lexers/postgres.py +++ b/pygments/lexers/postgres.py @@ -122,7 +122,8 @@ class PostgresLexer(RegexLexer): ] } -re_prompt = re.compile(r'^([a-zA-Z_][a-zA-Z0-9_]+)?[=\-\(][#>]') +re_prompt = re.compile(r'^.*?[=\-\(][#>]') + re_psql_command = re.compile(r'(\s*)(\\.+?)(\s+)$') re_error = re.compile(r'ERROR:') re_message = re.compile(r'((?:DEBUG|INFO|NOTICE|WARNING|ERROR|HINT|LINE [0-9]+):)(.*?\n)') -- cgit v1.2.1