Distill line breaks

main
Bob Mottram 2023-09-20 14:00:36 +01:00
parent 9f30a52368
commit 713c6db446
1 changed files with 6 additions and 1 deletions

View File

@ -2222,7 +2222,12 @@ def format_mixed_right_to_left(content: str,
result += text_html
if not changed:
result = ''
paragraphs = content.split('<br><br>')
prev_distilled = ''
distilled = content
while prev_distilled != distilled:
prev_distilled = distilled
distilled = distilled.replace('<br><br><br>', '<br><br>')
paragraphs = distilled.split('<br><br>')
ctr = 0
for text_html in paragraphs:
ctr += 1