Skip to content

Commit 3d0b218

Browse files
committed
Strip comments from a token list before sublists
Avoid stripping T.Comment tokens contained within an sql.Comment before stripping the sql.Comment itself. Now an sql.Comment token will be stripped first along with any contained T.Comment tokens.
1 parent fc76056 commit 3d0b218

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

sqlparse/filters/others.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ def _get_insert_token(token):
5151
tidx, token = get_next_comment()
5252

5353
def process(self, stmt):
54-
[self.process(sgroup) for sgroup in stmt.get_sublists()]
5554
StripCommentsFilter._process(stmt)
55+
[self.process(sgroup) for sgroup in stmt.get_sublists()]
5656
return stmt
5757

5858

0 commit comments

Comments
 (0)