~boringcactus/cactus-ssg

8dd7786d99976f3ae6bed9873a7a7759d59f0912 — Melody Horn 6 months ago c99de3f
only strip quotes if they match
1 files changed, 4 insertions(+), 1 deletions(-)

M build.py
M build.py => build.py +4 -1
@@ 99,7 99,10 @@ def render(site_dir, page: Page):
def parse_front_matter(front_matter: str):
    lines = front_matter.split('\n')
    fields = [line.split(': ', 1) for line in lines if len(line.strip()) > 0]
    return dict((key, value.strip('"')) for key, value in fields)
    for i in range(len(fields)):
        if fields[i][1].startswith('"') and fields[i][1].endswith('"'):
            fields[i][1] = fields[i][1][1:-1]
    return dict((key, value) for key, value in fields)


def get_excerpt(body: str):