This extension adds YAML meta data handling to markdown.
As in the original, meta data is parsed but not used in processing.
(YAML meta data is used e.g. by pandoc)
Dependencies: PyYAML
Copyright 2014 Bernhard Fisseni
Based on the meta data extension included with Python-Markdown, Copyright 2007-2008 Waylan Limberg.
License: BSD (see LICENSE.md for details)
>>> import markdown
>>> text = '''---
... Title: Test Doc.
... Author: Waylan Limberg
... Blank_Data:
... ...
...
... The body. This is paragraph one.
... '''
>>> md = markdown.Markdown(['meta_yaml'])
>>> print(md.convert(text))
<p>The body. This is paragraph one.</p>
>>> print(md.Meta) # doctest: +SKIP
{'blank_data': [''], 'author': ['Waylan Limberg'], 'title': ['Test Doc.']}
copy python code e.g. to Packages/User
enable as extension in User Preferences
"extensions": [
...
"User.meta_yaml", // if installed in Packages/User
...
]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4