From b00a3779a678ad5d68736254a589a45236ef4078 Mon Sep 17 00:00:00 2001 From: Sina Atalay Date: Wed, 14 Feb 2024 18:03:01 +0100 Subject: [PATCH] fix a bug in transform_markdown_data_model_to_latex_data_model --- rendercv/renderer.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/rendercv/renderer.py b/rendercv/renderer.py index 32e9e16..f232178 100644 --- a/rendercv/renderer.py +++ b/rendercv/renderer.py @@ -486,10 +486,14 @@ def transform_markdown_data_model_to_latex_data_model( for section_title, entries in sections.items(): transformed_entries = [] for entry in entries: - transformed_entry = ( - transform_markdown_data_model_to_latex_data_model(entry) - ) - transformed_entries.append(transformed_entry) + if isinstance(entry, str): + result = markdown_to_latex(escape_latex_characters(entry)) + transformed_entries.append(result) + else: + transformed_entry = ( + transform_markdown_data_model_to_latex_data_model(entry) + ) + transformed_entries.append(transformed_entry) setattr(data_model, key, sections) else: # Then it means it's a sub data model.