Allow parentheses in post headers values
This commit is contained in:
parent
e3b30e6a98
commit
89ea18a805
1 changed files with 2 additions and 2 deletions
|
@ -61,11 +61,11 @@ class BlogApp(Flask):
|
||||||
with open(md_file, "r") as f:
|
with open(md_file, "r") as f:
|
||||||
metadata["uri"] = "/article/" + page[:-3]
|
metadata["uri"] = "/article/" + page[:-3]
|
||||||
|
|
||||||
for line in f.readlines():
|
for line in f:
|
||||||
if not line:
|
if not line:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if not (m := re.match(r"^\[//]: # \(([^:]+):\s*([^)]+)\)\s*$", line)):
|
if not (m := re.match(r"^\[//]: # \(([^:]+):\s*(.*)\)\s*$", line)):
|
||||||
break
|
break
|
||||||
|
|
||||||
if m.group(1) == "published":
|
if m.group(1) == "published":
|
||||||
|
|
Loading…
Reference in a new issue