merge-requests/30/head
Bob Mottram 2024-06-19 20:32:25 +01:00
parent 7c28ef0588
commit 87e109d482
1 changed files with 8 additions and 6 deletions

View File

@ -400,11 +400,13 @@ def markdown_to_html(markdown: str) -> str:
html_str += line html_str += line
ctr += 1 ctr += 1
html_str = html_str.replace('<code><br>', '<code>') replacements = (
html_str = html_str.replace('</code><br>', '</code>') ('<code><br>', '<code>'),
('</code><br>', '</code>'),
html_str = html_str.replace('<ul class="md_list"><br>', ('<ul class="md_list"><br>', '<ul class="md_list">'),
'<ul class="md_list">') ('</li><br>', '</li>')
html_str = html_str.replace('</li><br>', '</li>') )
for pair in replacements:
html_str = html_str.replace(pair[0], pair[1])
return html_str return html_str