[SSG] Strip spaces in values in file headers.
This commit is contained in:
parent
11ede38d1b
commit
802acb5cc1
4
nova.py
4
nova.py
|
@ -180,7 +180,7 @@ class Episode:
|
||||||
def __init__(self, date, slug, title, show_notes, video_src, audio_src, config):
|
def __init__(self, date, slug, title, show_notes, video_src, audio_src, config):
|
||||||
self.date = date
|
self.date = date
|
||||||
self.slug = slug
|
self.slug = slug
|
||||||
self.title = title.strip()
|
self.title = title
|
||||||
self.show_notes = markdown.markdown(show_notes)
|
self.show_notes = markdown.markdown(show_notes)
|
||||||
self.video = video_src
|
self.video = video_src
|
||||||
self.audio = audio_src
|
self.audio = audio_src
|
||||||
|
@ -237,7 +237,7 @@ def parse_file(file, array_keys=("tags")):
|
||||||
config[match.group("key")] = [i.strip() for i in
|
config[match.group("key")] = [i.strip() for i in
|
||||||
match.group("value").split(",")]
|
match.group("value").split(",")]
|
||||||
else:
|
else:
|
||||||
config[match.group("key")] = match.group("value")
|
config[match.group("key")] = match.group("value").strip()
|
||||||
else:
|
else:
|
||||||
raise ParseError(f"Invalid line {line}")
|
raise ParseError(f"Invalid line {line}")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue