Allow parentheses in post headers values

This commit is contained in:
Fabio Manganiello 2024-04-11 01:24:34 +02:00
parent e3b30e6a98
commit 89ea18a805
1 changed files with 2 additions and 2 deletions

View File

@ -61,11 +61,11 @@ class BlogApp(Flask):
with open(md_file, "r") as f:
metadata["uri"] = "/article/" + page[:-3]
for line in f.readlines():
for line in f:
if not line:
continue
if not (m := re.match(r"^\[//]: # \(([^:]+):\s*([^)]+)\)\s*$", line)):
if not (m := re.match(r"^\[//]: # \(([^:]+):\s*(.*)\)\s*$", line)):
break
if m.group(1) == "published":