diff options
author | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2011-04-12 09:42:13 +0100 |
---|---|---|
committer | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2011-04-12 09:42:13 +0100 |
commit | 65f922591a2c55d7955bcd3fb607fd529b391d5e (patch) | |
tree | e962b842cfa0c8c60d5673ffb0892296df3b5388 | |
parent | 5c78ceb3e427f352a5bd28d75b0e42293a9d03bf (diff) | |
download | pygments-65f922591a2c55d7955bcd3fb607fd529b391d5e.tar.gz |
Identify the name of a PostgreSQL procedure language also when quoted
-rw-r--r-- | pygments/lexers/postgres.py | 2 | ||||
-rw-r--r-- | tests/examplefiles/postgresql_test.txt | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/pygments/lexers/postgres.py b/pygments/lexers/postgres.py index 1bb38556..583e118d 100644 --- a/pygments/lexers/postgres.py +++ b/pygments/lexers/postgres.py @@ -25,7 +25,7 @@ __all__ = [ 'PostgresLexer', 'PostgresConsoleLexer' ] line_re = re.compile('.*?\n') -language_re = re.compile(r'\s+LANGUAGE\s+(\w+)') +language_re = re.compile(r"\s+LANGUAGE\s+'?(\w+)'?") class PostgresLexer(RegexLexer): """ diff --git a/tests/examplefiles/postgresql_test.txt b/tests/examplefiles/postgresql_test.txt index b818c33a..c02cb1f2 100644 --- a/tests/examplefiles/postgresql_test.txt +++ b/tests/examplefiles/postgresql_test.txt @@ -4,7 +4,7 @@ BEGIN RETURN 42; END $x$ -LANGUAGE plpgsql; +LANGUAGE 'plpgsql'; CREATE FUNCTION pymax (a integer, b integer) RETURNS integer |