From 002f37dde390ab2f189c579f5fb18e191f7eed89 Mon Sep 17 00:00:00 2001 From: Fredy Wijaya Date: Fri, 9 Mar 2018 14:35:33 -0600 Subject: Fix incorrect splitting with double quotes and a new line --- sqlparse/keywords.py | 1 + 1 file changed, 1 insertion(+) (limited to 'sqlparse') 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 -- -- cgit v1.2.1