From 1181ad5858a06eed1addcd613b32e968575d3678 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 26 Feb 2021 23:28:19 +0000 Subject: [PATCH] Remove trailing newline from blockquote --- webapp_utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/webapp_utils.py b/webapp_utils.py index 7a3fe6b1d..a0f7d0076 100644 --- a/webapp_utils.py +++ b/webapp_utils.py @@ -94,9 +94,12 @@ def _markdownReplaceQuotes(markdown: str) -> str: result += lineStr prevQuoteLine = lineStr + if '\n' in result: + result = result.replace('\n', '') + if result.endswith('\n') and \ not markdown.endswith('\n'): - result = result[:len(result) -1] + result = result[:len(result) - 1] return result