1
0
Fork 0
forked from github/pelican

Pass the metadata conversion in Markdown as well,

so that dates and tags are correctly processed.

Signed-off-by: Guillaume B <guitreize@gmail.com>
This commit is contained in:
Guillaume B 2010-11-11 05:27:14 +08:00 committed by Alexis Metaireau
commit c8184ffcbc

View file

@ -49,7 +49,11 @@ class MarkdownReader(object):
metadatas = {}
for name, value in md.Meta.items():
metadatas[name.lower()] = value[0]
if name in _METADATAS_FIELDS:
meta = _METADATAS_FIELDS[name](value[0])
else:
meta = value[0]
metadatas[name.lower()] = meta
return content, metadatas
_EXTENSIONS = {'rst': RstReader, 'md': MarkdownReader} # supported formats