summaryrefslogtreecommitdiff
path: root/sqlparse
diff options
context:
space:
mode:
Diffstat (limited to 'sqlparse')
-rw-r--r--sqlparse/filters.py11
1 files changed, 2 insertions, 9 deletions
diff --git a/sqlparse/filters.py b/sqlparse/filters.py
index a639f7a..83c466b 100644
--- a/sqlparse/filters.py
+++ b/sqlparse/filters.py
@@ -80,24 +80,17 @@ def StripWhitespace(stream):
last_type = None
for token_type, value in stream:
- print repr(token_type), repr(value)
# We got a previous token
if last_type:
- print '\t 1', repr(token_type), repr(value)
-
if token_type in Whitespace:
- if last_type in Whitespace:
+ if last_type in (Whitespace, Whitespace.Newline, Punctuation):
continue
value = ' '
# Ignore first empty spaces and dot-commas
- elif token_type in Whitespace + Punctuation:
+ elif token_type in (Whitespace, Whitespace.Newline, Punctuation):
continue
- # There's no previous token
- else:
- print '\t 2', repr(token_type), repr(value)
-
yield token_type, value
last_type = token_type