Allow metadata block in the middle of file
This commit is contained in:
parent
c81e7a999f
commit
60d290e24f
@ -91,9 +91,14 @@ class MetaYamlPreprocessor(Preprocessor):
|
|||||||
""" Parse Meta-Data and store in Markdown.Meta. """
|
""" Parse Meta-Data and store in Markdown.Meta. """
|
||||||
|
|
||||||
yaml_block = []
|
yaml_block = []
|
||||||
line = lines.pop(0)
|
yaml_start_found = False
|
||||||
|
while lines:
|
||||||
|
line = lines.pop(0)
|
||||||
|
if line == "---":
|
||||||
|
yaml_start_found = True
|
||||||
|
break
|
||||||
|
|
||||||
if line == "---":
|
if yaml_start_found == True:
|
||||||
while lines:
|
while lines:
|
||||||
line = lines.pop(0)
|
line = lines.pop(0)
|
||||||
if line in ("---", "..."):
|
if line in ("---", "..."):
|
||||||
|
Loading…
Reference in New Issue
Block a user