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.
This commit is contained in:
Marty Oehme 2023-07-31 09:33:57 +02:00
parent 30add534e0
commit b6302e0ca6
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A

View file

@ -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"]: