Less indentation

main
Bob Mottram 2024-11-06 10:21:47 +00:00
parent e34deb4b28
commit db0969ac80
1 changed files with 7 additions and 6 deletions

View File

@ -178,13 +178,14 @@ def html_replace_email_quote(content: str) -> str:
new_content += '<p>' + line_str + '</blockquote></p>'
else:
new_content += '<p>' + line_str + '</p>'
continue
line_str = line_str.replace('>&gt; ', '><blockquote>')
if line_str.startswith('&gt;'):
line_str = line_str.replace('&gt;', '<blockquote>', 1)
else:
line_str = line_str.replace('>&gt; ', '><blockquote>')
if line_str.startswith('&gt;'):
line_str = line_str.replace('&gt;', '<blockquote>', 1)
else:
line_str = line_str.replace('&gt;', '<br>')
new_content += '<p>' + line_str + '</blockquote></p>'
line_str = line_str.replace('&gt;', '<br>')
new_content += '<p>' + line_str + '</blockquote></p>'
return _remove_quotes_within_quotes(new_content)