mirror of https://gitlab.com/bashrc2/epicyon
bold rather than headers
parent
61b21a688e
commit
7aaeb0d797
8
blog.py
8
blog.py
|
|
@ -210,7 +210,7 @@ def html_blog_post_markdown(content: str) -> str:
|
||||||
">###### ": "h6"
|
">###### ": "h6"
|
||||||
}
|
}
|
||||||
new_content = content
|
new_content = content
|
||||||
for markdown_text, html_header in replacements.items():
|
for markdown_text, _ in replacements.items():
|
||||||
if markdown_text not in new_content:
|
if markdown_text not in new_content:
|
||||||
continue
|
continue
|
||||||
sections = new_content.split(markdown_text)
|
sections = new_content.split(markdown_text)
|
||||||
|
|
@ -222,11 +222,9 @@ def html_blog_post_markdown(content: str) -> str:
|
||||||
ctr += 1
|
ctr += 1
|
||||||
continue
|
continue
|
||||||
if '<' in section:
|
if '<' in section:
|
||||||
section = '><' + html_header + '>' + \
|
section = '><b>' + section.replace('<', '</b><', 1)
|
||||||
section.replace('<', '</' + html_header + '><', 1)
|
|
||||||
elif '\n' in section:
|
elif '\n' in section:
|
||||||
section = '><' + html_header + '>' + \
|
section = '><b>' + section.replace('\n', '</b>\n', 1)
|
||||||
section.replace('\n', '</' + html_header + '>\n', 1)
|
|
||||||
else:
|
else:
|
||||||
section = markdown_text + section
|
section = markdown_text + section
|
||||||
new_content2 += section
|
new_content2 += section
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue