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