From c22fe57522e995ddf4ca36fbb5c5e8df10068ef0 Mon Sep 17 00:00:00 2001 From: Sina Atalay Date: Mon, 11 Mar 2024 20:29:37 +0100 Subject: [PATCH] renderer: improve markdown_to_latex --- rendercv/renderer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rendercv/renderer.py b/rendercv/renderer.py index 5848f13..97a2191 100644 --- a/rendercv/renderer.py +++ b/rendercv/renderer.py @@ -383,7 +383,7 @@ def markdown_to_latex(markdown_string: str) -> str: markdown_string = markdown_string.replace(old_link_string, new_link_string) # convert bold - bolds = re.findall(r"\*\*([^\*]*)\*\*", markdown_string) + bolds = re.findall(r"\*\*(.+?)\*\*", markdown_string) if bolds is not None: for bold_text in bolds: 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) # convert italic - italics = re.findall(r"\*([^\*]*)\*", markdown_string) + italics = re.findall(r"\*(.+?)\*", markdown_string) if italics is not None: for italic_text in italics: old_italic_text = f"*{italic_text}*"