adjusted the rules to match paprika3
This commit is contained in:
parent
ffd0682a00
commit
01273dfaab
|
@ -11,12 +11,13 @@ def convert_md_to_paprika3(file_path):
|
|||
formatted_contents = re.sub(r"## (.*)", r"<h2>\1</h2>", formatted_contents)
|
||||
formatted_contents = re.sub(
|
||||
r"### (.*)", r"<h3>\1</h3>", formatted_contents)
|
||||
formatted_contents = re.sub(
|
||||
r"__(.*)__", r"<strong>\1</strong>", formatted_contents)
|
||||
formatted_contents = re.sub(
|
||||
r"\*\*(.*)\*\*", r"<strong>\1</strong>", formatted_contents)
|
||||
formatted_contents = re.sub(r"_(.*)_", r"<em>\1</em>", formatted_contents)
|
||||
# write the formatted text to a new file
|
||||
with open(file_path[:-3] + ".paprika3", "w") as f:
|
||||
f.write(formatted_contents)
|
||||
formatted_contents = re.sub(
|
||||
r"\*(.*)\*", r"<em>\1</em>", formatted_contents)
|
||||
|
||||
|
||||
# prompt the user for the folder path
|
||||
|
|
Loading…
Reference in New Issue