1. cormullion
  2. pygments-main


Daniele Varrazzo  committed 3743d5b

Ignore case of the language in PostgreSQL $-string parsing

  • Participants
  • Parent commits 0e83633
  • Branches default

Comments (0)

Files changed (2)

File pygments/lexers/postgres.py

View file
  • Ignore whitespace
 line_re  = re.compile('.*?\n')
-language_re = re.compile(r"\s+LANGUAGE\s+'?(\w+)'?")
+language_re = re.compile(r"\s+LANGUAGE\s+'?(\w+)'?", re.IGNORECASE)
 class PostgresLexer(RegexLexer):

File tests/examplefiles/postgresql_test.txt

View file
  • Ignore whitespace
   if a > b:
     return a
   return b
-$$ LANGUAGE plpythonu;
+$$ language plpythonu;
 CREATE FUNCTION nested_lexers (a integer, b integer)