Skip to content

Commit

Permalink
Simplify regex.
Browse files Browse the repository at this point in the history
  • Loading branch information
andialbrecht committed Sep 19, 2023
1 parent fac38cd commit 5c94352
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sqlparse/filters/others.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def _get_insert_token(token):
# Note: The actual value for a line break is replaced by \n
# in SerializerUnicode which will be executed in the
# postprocessing state.
m = re.search(r'((\r|\n)+) *$', token.value)
m = re.search(r'([\r\n]+) *$', token.value)
if m is not None:
return sql.Token(T.Whitespace.Newline, m.groups()[0])
else:
Expand Down

0 comments on commit 5c94352

Please sign in to comment.