Remove surrounding whitespace in fortunes
This commit is contained in:
parent
ca9b6a2009
commit
ad26f0b693
@ -3492,8 +3492,8 @@ def transition_day(cli, gameid=0):
|
||||
else:
|
||||
out = out.decode("utf-8", "replace")
|
||||
out = out.replace("\n", " ")
|
||||
# Replace tabs and multiple spaces with a single space.
|
||||
out = re.sub(r"\s+", " ", out)
|
||||
out = re.sub(r"\s+", " ", out) # collapse whitespace
|
||||
out = out.strip() # remove surrounding whitespace
|
||||
|
||||
message.append(out)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user