From d3ffc0ed2b394ac79a856ef1e84a219d850a0b9b Mon Sep 17 00:00:00 2001 From: George Cushen Date: Thu, 13 Aug 2020 20:19:16 +0100 Subject: [PATCH] fix: self vars undeclared during FM init --- academic/editFM.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/academic/editFM.py b/academic/editFM.py index e56c8a9..aad37ab 100644 --- a/academic/editFM.py +++ b/academic/editFM.py @@ -11,11 +11,13 @@ def __init__(self, base_path: Path, delim: str = "---"): if delim != "---": raise NotImplementedError("Currently, YAML is the only supported front-matter format.") self.delim = delim + self.fm = [] + self.content = [] + self.path = "" def load(self, file: Path): self.fm = [] self.content = [] - self.path = self.base_path / file file = open(self.path, "r").readlines()