From d0594f4a8fc355c5731cd2e2df73f9a16c4341f3 Mon Sep 17 00:00:00 2001 From: Sina Atalay Date: Fri, 29 Mar 2024 19:05:41 +0100 Subject: [PATCH] renderer: fix a markdown parsing bug --- rendercv/renderer.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rendercv/renderer.py b/rendercv/renderer.py index 3b1a780..020334b 100644 --- a/rendercv/renderer.py +++ b/rendercv/renderer.py @@ -185,9 +185,9 @@ class LaTeXFile(TemplatedFile): # ones with \textnormal: # Find all the nested commands: - nested_commands = re.findall(r"\\textbf{.*?(\\textbf{.*?})", result) - nested_commands += re.findall(r"\\textit{.*?(\\textit{.*?})", result) - nested_commands += re.findall(r"\\underline{.*?(\\underline{.*?})", result) + nested_commands = re.findall(r"\\textbf{[^}]*?(\\textbf{.*?})", result) + nested_commands += re.findall(r"\\textit{[^}]*?(\\textit{.*?})", result) + nested_commands += re.findall(r"\\underline{[^}]*?(\\underline{.*?})", result) # Replace the inner commands with \textnormal: for nested_command in nested_commands: