Skip to content

Commit ca8c74f

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 38c065b commit ca8c74f

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
@@ -74,8 +74,8 @@ def _get_insert_token(token):
7474
tidx, token = get_next_comment(idx=tidx)
7575

7676
def process(self, stmt):
77-
[self.process(sgroup) for sgroup in stmt.get_sublists()]
7877
StripCommentsFilter._process(stmt)
78+
[self.process(sgroup) for sgroup in stmt.get_sublists()]
7979
return stmt
8080

8181

0 commit comments

Comments
 (0)