From b28193fe68e54539f39c8b2909a4f2959c0c8436 Mon Sep 17 00:00:00 2001 From: Sina Atalay Date: Sun, 19 Nov 2023 20:23:43 +0100 Subject: [PATCH] don't escape backslashes --- rendercv/data_model.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/rendercv/data_model.py b/rendercv/data_model.py index 2fae5c8..ae3a110 100644 --- a/rendercv/data_model.py +++ b/rendercv/data_model.py @@ -69,12 +69,13 @@ def escape_latex_characters(sentence: str) -> str: # Handle backslash and curly braces separately because the other characters are # escaped with backslash and curly braces: - sentence = sentence.replace("{", ">>{") - sentence = sentence.replace("}", ">>}") - # don't escape backslash as it is used heavily in LaTeX: + # --don't escape curly braces as they are used heavily in LaTeX--: + # sentence = sentence.replace("{", ">>{") + # sentence = sentence.replace("}", ">>}") + # --don't escape backslash as it is used heavily in LaTeX--: # sentence = sentence.replace("\\", "\\textbackslash{}") - sentence = sentence.replace(">>{", "\\{") - sentence = sentence.replace(">>}", "\\}") + # sentence = sentence.replace(">>{", "\\{") + # sentence = sentence.replace(">>}", "\\}") # Loop through the letters of the sentence and if you find an escape character, # replace it with its LaTeX equivalent: