Closed maxmahlke closed 1 year ago
Thanks for reporting this! I'm doing a big refactoring of the codebase for a v3.0 - I'll include this in there too! It should only be a week or two away, I've done the bulk of the work already in the 3.0-dev branch.
Actually, I'll cut a new release and get this fix out
Describe the bug I tried setting the
date
metadata field using different formats such asdate: September 2, 2022
,date: 01/09/2022
yet kept getting themarshmallow.exceptions.ValidationError: {'date': ['Not a valid date.']}
when launchinglookatme
. The reason is that thedate
attribute of theMetaSchema
requires adatetime.datetime
instance. Unless I'm misunderstanding the intended use, a validdate
cannot be set at all via the markdown file.I changed
in
lookatme/schemas.py
toas for the
title
andauthor
. Now I can set the date to any string. I'd be happy to submit a PR for this if you approve.To Reproduce
Steps to reproduce the behavior:
md
filedate: 01/09/2022
in metadata headerlookatme
pointing to the slidesmd file
Expected behavior The
date
string should be printed as I define it, no validation necessary.Environment (please complete the following information): lookatme, version 2.3.2