collapse excessive newlines into two
This commit is contained in:
parent
377f20439e
commit
e1e38cbbe8
|
@ -31,6 +31,7 @@ def message(socket, data):
|
||||||
# cleaning
|
# cleaning
|
||||||
message = message[:512]
|
message = message[:512]
|
||||||
message = message.strip()
|
message = message.strip()
|
||||||
|
message = re.sub(r'\n\n+', '\n\n', message)
|
||||||
if not message:
|
if not message:
|
||||||
return
|
return
|
||||||
tags = ["b", "code", "i", "s"]
|
tags = ["b", "code", "i", "s"]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user