summaryrefslogtreecommitdiff
path: root/sqlparse
diff options
context:
space:
mode:
authorFredy Wijaya <fredy.wijaya@gmail.com>2018-03-09 14:35:33 -0600
committerFredy Wijaya <fredy.wijaya@gmail.com>2018-03-09 14:36:37 -0600
commit002f37dde390ab2f189c579f5fb18e191f7eed89 (patch)
treec16ed3ec16e11785858cfdce996966c732ed71ca /sqlparse
parent9cf45ebf8c9d59442e4739befeac968002510699 (diff)
downloadsqlparse-002f37dde390ab2f189c579f5fb18e191f7eed89.tar.gz
Fix incorrect splitting with double quotes and a new line
Diffstat (limited to 'sqlparse')
-rw-r--r--sqlparse/keywords.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/sqlparse/keywords.py b/sqlparse/keywords.py
index b5b59e8..bca50ba 100644
--- a/sqlparse/keywords.py
+++ b/sqlparse/keywords.py
@@ -64,6 +64,7 @@ SQL_REGEX = {
(r'-?\d+(?![_A-ZÀ-Ü])', tokens.Number.Integer),
(r"'(''|\\\\|\\'|[^'])*'", tokens.String.Single),
# not a real string literal in ANSI SQL:
+ (r'"(""|\\\\|\\"|[^"])*"', tokens.String.Symbol),
(r'(""|".*?[^\\]")', tokens.String.Symbol),
# sqlite names can be escaped with [square brackets]. left bracket
# cannot be preceded by word character or a right bracket --