summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES2
-rw-r--r--pygments/__init__.py2
-rw-r--r--pygments/lexers/sql.py14
-rwxr-xr-xsetup.py2
4 files changed, 15 insertions, 5 deletions
diff --git a/CHANGES b/CHANGES
index 25361c5a..0205c912 100644
--- a/CHANGES
+++ b/CHANGES
@@ -31,7 +31,7 @@ Version 2.2
Version 2.1.1
-------------
-(in development)
+(relased Feb 14, 2016)
- Fixed Jython compatibility (#1205)
- Fixed HTML formatter output with leading empty lines (#1111)
diff --git a/pygments/__init__.py b/pygments/__init__.py
index 7bd7557f..e825aa39 100644
--- a/pygments/__init__.py
+++ b/pygments/__init__.py
@@ -26,7 +26,7 @@
:license: BSD, see LICENSE for details.
"""
-__version__ = '2.1'
+__version__ = '2.2a0'
__docformat__ = 'restructuredtext'
__all__ = ['lex', 'format', 'highlight']
diff --git a/pygments/lexers/sql.py b/pygments/lexers/sql.py
index 948d876a..7c06226b 100644
--- a/pygments/lexers/sql.py
+++ b/pygments/lexers/sql.py
@@ -162,9 +162,9 @@ class PostgresLexer(PostgresBase, RegexLexer):
(r'\$\d+', Name.Variable),
(r'([0-9]*\.[0-9]*|[0-9]+)(e[+-]?[0-9]+)?', Number.Float),
(r'[0-9]+', Number.Integer),
- (r"((?:E|U&)?)('(?:''|[^'])*')", bygroups(String.Affix, String.Single)),
+ (r"((?:E|U&)?)(')", bygroups(String.Affix, String.Single), 'string'),
# quoted identifier
- (r'((?:U&)?)("(?:""|[^"])*")', bygroups(String.Affix, String.Name)),
+ (r'((?:U&)?)(")', bygroups(String.Affix, String.Name), 'quoted-ident'),
(r'(?s)(\$)([^$]*)(\$)(.*?)(\$)(\2)(\$)', language_callback),
(r'[a-z_]\w*', Name),
@@ -179,6 +179,16 @@ class PostgresLexer(PostgresBase, RegexLexer):
(r'[^/*]+', Comment.Multiline),
(r'[/*]', Comment.Multiline)
],
+ 'string': [
+ (r"[^']+", String.Single),
+ (r"''", String.Single),
+ (r"'", String.Single, '#pop'),
+ ],
+ 'quoted-ident': [
+ (r'[^"]+', String.Name),
+ (r'""', String.Name),
+ (r'"', String.Name, '#pop'),
+ ],
}
diff --git a/setup.py b/setup.py
index a8667fda..a07ac055 100755
--- a/setup.py
+++ b/setup.py
@@ -54,7 +54,7 @@ else:
setup(
name = 'Pygments',
- version = '2.1',
+ version = '2.2',
url = 'http://pygments.org/',
license = 'BSD License',
author = 'Georg Brandl',