mirror of https://github.com/eyhc1/rendercv.git
renderer: improve markdown_to_latex
This commit is contained in:
parent
2847b1ef6d
commit
c22fe57522
|
@ -383,7 +383,7 @@ def markdown_to_latex(markdown_string: str) -> str:
|
||||||
markdown_string = markdown_string.replace(old_link_string, new_link_string)
|
markdown_string = markdown_string.replace(old_link_string, new_link_string)
|
||||||
|
|
||||||
# convert bold
|
# convert bold
|
||||||
bolds = re.findall(r"\*\*([^\*]*)\*\*", markdown_string)
|
bolds = re.findall(r"\*\*(.+?)\*\*", markdown_string)
|
||||||
if bolds is not None:
|
if bolds is not None:
|
||||||
for bold_text in bolds:
|
for bold_text in bolds:
|
||||||
old_bold_text = f"**{bold_text}**"
|
old_bold_text = f"**{bold_text}**"
|
||||||
|
@ -392,7 +392,7 @@ def markdown_to_latex(markdown_string: str) -> str:
|
||||||
markdown_string = markdown_string.replace(old_bold_text, new_bold_text)
|
markdown_string = markdown_string.replace(old_bold_text, new_bold_text)
|
||||||
|
|
||||||
# convert italic
|
# convert italic
|
||||||
italics = re.findall(r"\*([^\*]*)\*", markdown_string)
|
italics = re.findall(r"\*(.+?)\*", markdown_string)
|
||||||
if italics is not None:
|
if italics is not None:
|
||||||
for italic_text in italics:
|
for italic_text in italics:
|
||||||
old_italic_text = f"*{italic_text}*"
|
old_italic_text = f"*{italic_text}*"
|
||||||
|
|
Loading…
Reference in New Issue