diff options
author | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2011-04-13 09:47:07 +0100 |
---|---|---|
committer | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2011-04-13 09:47:07 +0100 |
commit | 4f8f83415ac1a0e6c932e26a460fd83fa04e9811 (patch) | |
tree | 083b3239bc08c34b9bdd9ddcde04eb1396768728 /pygments/lexers/postgres.py | |
parent | 945f3619983ba80b536b5f54d9c55b5abe4874f5 (diff) | |
download | pygments-4f8f83415ac1a0e6c932e26a460fd83fa04e9811.tar.gz |
The prompt in psql must start with a non-blank character
Otherwise we are fooled by the arrows in the EXPLAIN output.
Diffstat (limited to 'pygments/lexers/postgres.py')
-rw-r--r-- | pygments/lexers/postgres.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pygments/lexers/postgres.py b/pygments/lexers/postgres.py index 4b4ad44c..21185b30 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'^.*?[=\-\(][#>]') +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+)$') |