Alternative ending for markdown headers

main
Bob Mottram 2025-12-07 17:14:42 +00:00
parent 96cda1b343
commit b965589dc3
1 changed files with 3 additions and 0 deletions

View File

@ -224,6 +224,9 @@ def _html_blog_post_markdown(content: str) -> str:
if '<' in section:
section = '<' + html_header + '>' + \
section.replace('<', '</' + html_header + '><', 1)
elif '\n' in section:
section = '<' + html_header + '>' + \
section.replace('\n', '</' + html_header + '>\n', 1)
else:
section = markdown_text + section
new_content2 += section