From b6302e0ca624bdd3994f477b60cb1c0e74d33b38 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Mon, 31 Jul 2023 09:33:57 +0200 Subject: [PATCH] Fix empty sections in cv Whenever an empty section was encountered we returned `None` which lead to display artifacts as Quarto tried to interpret what we actually wanted to display. Instead, we simply return an empty string which is to be 'displayed' so nothing will be shown. --- processing/content.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/processing/content.py b/processing/content.py index 0060b89..1d00895 100644 --- a/processing/content.py +++ b/processing/content.py @@ -3,7 +3,7 @@ from typing import Any def summary_to_md(data: dict[str, Any], lang: str = "en", headline: str = ""): if "summary" not in data: - return + return "" md = f"{headline}\n\n {data['summary'][lang]}\n\n" return md @@ -26,7 +26,7 @@ def experience_to_md( subdued_publications: bool = True, ): if "experience" not in data: - return + return "" md = f"{headline}\n\n" md += "\\definecolor{publication}{rgb}{0.5,0.5,0.5}\n\n" @@ -56,7 +56,7 @@ def education_to_md( data: dict[str, Any], lang: str = "en", headline: str = "", thesis: bool = True ): if "education" not in data: - return + return "" md = f"{headline}\n\n" @@ -73,7 +73,7 @@ def education_to_md( def qualifications_to_md(data: dict[str, Any], lang: str = "en", headline: str = ""): if "skills" not in data: - return + return "" md = f"{headline}\n\n" for skillset in data["skills"]: