1
0
mirror of https://github.com/venthur/blag.git synced 2025-11-25 20:52:43 +00:00

convert tags to lower case

This commit is contained in:
Bastian Venthur
2021-02-09 21:45:02 +01:00
parent 6cb86b72ea
commit 5c06af6d0e

View File

@@ -60,9 +60,10 @@ def convert_markdown(md, markdown):
if 'date' in meta:
meta['date'] = datetime.fromisoformat(meta['date'])
meta['date'] = meta['date'].astimezone()
# tags: list[str]
# tags: list[str] and lower case
if 'tags' in meta:
tags = meta['tags'].split(',')
tags = [t.lower() for t in tags]
tags = [t.strip() for t in tags]
meta['tags'] = tags