Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Commit

Permalink
Allow for metadata in markdown documents
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Metson committed Apr 4, 2012
1 parent fb52776 commit 49a0cf7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions push_chapters.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,12 @@ def build(doc):
print "Could not parse metadata, invalid json?: %s" % m
content = "".join(filter(lambda x: not x.startswith('%%%'), md))
jdoc = {'_id': doc.strip('.md'), 'content': content}
<<<<<<< HEAD
if meta:
jdoc['meta'] = meta
=======
jdoc.update(meta)
>>>>>>> 419df19... Allow for metadata in markdown documents
f.close()
return jdoc

Expand Down

0 comments on commit 49a0cf7

Please sign in to comment.