1. Patrick Dubroy
  2. pygments-main


Daniele Varrazzo  committed 2092122

Identify the name of a PostgreSQL procedure language also when quoted

  • Participants
  • Parent commits 66d8320
  • Branches default

Comments (0)

Files changed (2)

File pygments/lexers/postgres.py

View file
 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):

File tests/examplefiles/postgresql_test.txt

View file
     RETURN 42;
-LANGUAGE plpgsql;
+LANGUAGE 'plpgsql';
 CREATE FUNCTION pymax (a integer, b integer)
   RETURNS integer