diff options
author | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2011-04-10 09:59:13 +0100 |
---|---|---|
committer | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2011-04-10 09:59:13 +0100 |
commit | 1e4841a12e712be36d7cef5a897ef162ff600fa3 (patch) | |
tree | 14391909ba8f5756dee4bb324d808dbfd8eaa06c /pygments/lexers/postgres.py | |
parent | e11abcd7ec5c5b0d9a290a0833de3e810cad654b (diff) | |
download | pygments-1e4841a12e712be36d7cef5a897ef162ff600fa3.tar.gz |
More tolerant psql prompt
Recognize stuff as "user@host db=>" too.
Diffstat (limited to 'pygments/lexers/postgres.py')
-rw-r--r-- | pygments/lexers/postgres.py | 3 |
1 files changed, 2 insertions, 1 deletions
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)') |