summaryrefslogtreecommitdiff
path: root/markdown_renderer.py
diff options
context:
space:
mode:
Diffstat (limited to 'markdown_renderer.py')
-rw-r--r--markdown_renderer.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/markdown_renderer.py b/markdown_renderer.py
index 7c1bd0b..dd70df2 100644
--- a/markdown_renderer.py
+++ b/markdown_renderer.py
@@ -28,7 +28,7 @@ def md_to_html(raw_content: str, text_mode: bool = False) -> str:
html_text = markdown.markdown(
content,
output_format="html",
- extensions=["attr_list", "fenced_code", "tables", DefaultClassExtension(), "md_in_html", "pymdownx.tilde", "footnotes"]
+ extensions=["attr_list", "fenced_code", "tables", DefaultClassExtension(), "md_in_html", "pymdownx.tilde", "footnotes", "codehilite"]
)
section_class = ""
@@ -46,11 +46,14 @@ def md_to_html(raw_content: str, text_mode: bool = False) -> str:
html_text = html_text.replace("<p>+=+=+=</p>", f'<section class="normal-section{section_class_only}"><div class="center-grid"><div class="div-sizing">')
html_text = html_text.replace("<p>+=+=+=", f'<section class="normal-section{section_class_only}"><div class="center-grid"><div class="div-sizing">')
html_text = html_text.replace("+=+=+=</p>", f'<section class="normal-section{section_class_only}"><div class="center-grid"><div class="div-sizing">')
- html_text = html_text.replace("<p>{{{</p>", '<div class="flex-container gap">')
- html_text = html_text.replace("<p>{{{", '<div class="flex-container gap">')
- html_text = html_text.replace("{{{</p>", '<div class="flex-container gap">')
+ html_text = html_text.replace("<p>{{{</p>", '<div class="flex-container flex-container-dynamic gap-row">')
+ html_text = html_text.replace("<p>{{{", '<div class="flex-container flex-container-dynamic gap-row">')
+ html_text = html_text.replace("{{{</p>", '<div class="flex-container flex-container-dynamic gap-row">')
html_text = html_text.replace("<p>}}}</p>", '</div>')
html_text = html_text.replace("}}}</p>", '</div>')
html_text = html_text.replace("<p>}}}", '</div>')
+ html_text = html_text.replace("<p>{&amp;{</p>", '<div class="flex-container flex-container-dynamic gap">')
+ html_text = html_text.replace("<p>{&amp;{", '<div class="flex-container flex-container-dynamic gap">')
+ html_text = html_text.replace("{&amp;{</p>", '<div class="flex-container flex-container-dynamic gap">')
return (metadata, html_text)