From 08b6d14400d5f1eb3a2bf98df181d9787f7100e4 Mon Sep 17 00:00:00 2001
From: Bob Mottram
Date: Mon, 14 Sep 2020 12:30:56 +0100
Subject: [PATCH] Style of quoted paragraphs
---
content.py | 6 ++++++
tests.py | 4 ++++
2 files changed, 10 insertions(+)
diff --git a/content.py b/content.py
index 8adf8ada..5f74c6f4 100644
--- a/content.py
+++ b/content.py
@@ -17,6 +17,12 @@ from utils import getLinkPrefixes
def htmlReplaceEmailQuote(content: str) -> str:
"""Replaces an email style quote "> Some quote" with html blockquote
"""
+ # replace quote paragraph
+ if '"' in content:
+ if '"
' in content:
+ content = content.replace('"', '
')
+ content = content.replace('"
', '')
+ # replace email style quote
if '>> ' not in content:
return content
contentStr = content.replace('', '')
diff --git a/tests.py b/tests.py
index 95fd86f6..abb35f43 100644
--- a/tests.py
+++ b/tests.py
@@ -2134,6 +2134,10 @@ def testReplaceEmailQuote():
'
With multiple
lines
'
assert htmlReplaceEmailQuote(testStr) == testStr
+ testStr = '"This is a quoted paragraph."
'
+ assert htmlReplaceEmailQuote(testStr) == \
+ 'This is a quoted paragraph.
'
+
testStr = "" + \
"@nickname " + \