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:
parent
30add534e0
commit
b6302e0ca6
1 changed files with 4 additions and 4 deletions
|
@ -3,7 +3,7 @@ from typing import Any
|
||||||
|
|
||||||
def summary_to_md(data: dict[str, Any], lang: str = "en", headline: str = ""):
|
def summary_to_md(data: dict[str, Any], lang: str = "en", headline: str = ""):
|
||||||
if "summary" not in data:
|
if "summary" not in data:
|
||||||
return
|
return ""
|
||||||
md = f"{headline}\n\n {data['summary'][lang]}\n\n"
|
md = f"{headline}\n\n {data['summary'][lang]}\n\n"
|
||||||
|
|
||||||
return md
|
return md
|
||||||
|
@ -26,7 +26,7 @@ def experience_to_md(
|
||||||
subdued_publications: bool = True,
|
subdued_publications: bool = True,
|
||||||
):
|
):
|
||||||
if "experience" not in data:
|
if "experience" not in data:
|
||||||
return
|
return ""
|
||||||
|
|
||||||
md = f"{headline}\n\n"
|
md = f"{headline}\n\n"
|
||||||
md += "\\definecolor{publication}{rgb}{0.5,0.5,0.5}\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
|
data: dict[str, Any], lang: str = "en", headline: str = "", thesis: bool = True
|
||||||
):
|
):
|
||||||
if "education" not in data:
|
if "education" not in data:
|
||||||
return
|
return ""
|
||||||
|
|
||||||
md = f"{headline}\n\n"
|
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 = ""):
|
def qualifications_to_md(data: dict[str, Any], lang: str = "en", headline: str = ""):
|
||||||
if "skills" not in data:
|
if "skills" not in data:
|
||||||
return
|
return ""
|
||||||
|
|
||||||
md = f"{headline}\n\n"
|
md = f"{headline}\n\n"
|
||||||
for skillset in data["skills"]:
|
for skillset in data["skills"]:
|
||||||
|
|
Loading…
Reference in a new issue