From 715a6b4e5b0afed9618903c79c7b61deb22e1689 Mon Sep 17 00:00:00 2001 From: Sina Atalay Date: Sat, 10 Feb 2024 22:57:53 +0100 Subject: [PATCH] update renderer for the new templating design --- rendercv/renderer.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/rendercv/renderer.py b/rendercv/renderer.py index b63e1d2..a881e41 100644 --- a/rendercv/renderer.py +++ b/rendercv/renderer.py @@ -48,7 +48,9 @@ class LaTeXFile: self.header = self.template("Header") self.sections = [] for section in self.cv.sections: - title = self.template("SectionTitle", section_title=section.title) + section_beginning = self.template( + "SectionBeginning", section_title=section.title + ) entries = [] for i, entry in enumerate(section.entries): if i == 0: @@ -63,7 +65,8 @@ class LaTeXFile: is_first_entry=is_first_entry, ) ) - self.sections.append((title, entries)) + section_ending = self.template("SectionEnding", section_title=section.title) + self.sections.append((section_beginning, entries, section_ending)) def template( self, @@ -76,7 +79,8 @@ class LaTeXFile: "TextEntry", "Header", "Preamble", - "SectionTitle", + "SectionBeginning", + "SectionEnding", ], entry: Optional[ dm.EducationEntry