content append instead of replace

pull/74/head
msramalho 2023-05-02 19:06:00 +01:00
rodzic 5b0bff612e
commit 9d44f4b207
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -89,7 +89,8 @@ class Metadata:
def set_content(self, content: str) -> Metadata:
# a dump with all the relevant content
return self.set("content", content)
append_content = (self.get("content", "") + content + "\n").strip()
return self.set("content", append_content)
def set_title(self, title: str) -> Metadata:
return self.set("title", title)