fix: ensure frontmatter values are unique within a key

This commit is contained in:
Nathaniel Landau
2023-03-20 13:58:49 -04:00
parent 36adfece51
commit ca42823a2f
5 changed files with 102 additions and 73 deletions

View File

@@ -281,6 +281,7 @@ class Frontmatter:
if key in self.dict and value not in self.dict[key]:
if isinstance(value, list):
self.dict[key].extend(value)
self.dict[key] = list(sorted(set(self.dict[key])))
return True
self.dict[key].append(value)