2022-07-14 20:38:45 +02:00
|
|
|
""" ================================= |
|
|
|
|
| This file is part of |
|
|
|
|
| staticoso |
|
|
|
|
| Just a simple Static Site Generator |
|
|
|
|
| |
|
|
|
|
| Licensed under the AGPLv3 license |
|
|
|
|
| Copyright (C) 2022, OctoSpacc |
|
|
|
|
| ================================= """
|
|
|
|
|
2022-08-26 19:53:47 +02:00
|
|
|
from Libs.markdown import markdown
|
2022-07-15 16:48:18 +02:00
|
|
|
|
2022-09-03 17:48:39 +02:00
|
|
|
MarkdownExtsDefault = ('attr_list', 'def_list', 'fenced_code', 'footnotes', 'md_in_html', 'tables')
|
2022-07-29 18:12:13 +02:00
|
|
|
|
2022-07-15 16:48:18 +02:00
|
|
|
def MarkdownHTMLEscape(Str, Extensions=()): # WIP
|
|
|
|
Text = ''
|
|
|
|
for i,e in enumerate(Str):
|
|
|
|
if ('mdx_subscript' or 'markdown_del_ins') in Extensions and e == '~':
|
|
|
|
e = '~'
|
|
|
|
Text += e
|
|
|
|
return Text
|