Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
remove_single_newlines: Fix double-space issue.
Tim Abbott5b1ec0035020
diff --git a/zerver/lib/message.py b/zerver/lib/message.pyindex 25ff5c34845..d9c6622705d 100644--- a/zerver/lib/message.py+++ b/zerver/lib/message.py@@ -1733,7 +1733,7 @@ def set_visibility_policy_possible(user_profile: UserProfile, message: Message)def remove_single_newlines(content: str) -> str:content = content.strip("\n")- return re.sub(r"(?<!\n)\n(?!\n|[-*] |[0-9]+\. )", " ", content)+ return re.sub(r"(?<!\n)\n(?!\n|[-*] |[0-9]+\. ) *", " ", content)def is_1_to_1_message(message: Message) -> bool: