Submit
Path:
~
/
/
proc
/
thread-self
/
root
/
proc
/
thread-self
/
root
/
usr
/
lib
/
python2.7
/
site-packages
/
markdown
/
extensions
/
File Content:
meta.pyo
� �(�Sc @@ s� d Z d d l m Z d d l m Z d d l m Z d d l m Z d d l Z e j d � Z e j d � Z d e f d � � YZ d e f d � � YZ i d � Z d S( uW Meta Data Extension for Python-Markdown ======================================= This extension adds Meta Data handling to markdown. Basic Usage: >>> import markdown >>> text = '''Title: A Test Doc. ... Author: Waylan Limberg ... John Doe ... Blank_Data: ... ... The body. This is paragraph one. ... ''' >>> md = markdown.Markdown(['meta']) >>> print md.convert(text) <p>The body. This is paragraph one.</p> >>> print md.Meta {u'blank_data': [u''], u'author': [u'Waylan Limberg', u'John Doe'], u'title': [u'A Test Doc.']} Make sure text without Meta Data still works (markdown < 1.6b returns a <p>). >>> text = ' Some Code - not extra lines of meta data.' >>> md = markdown.Markdown(['meta']) >>> print md.convert(text) <pre><code>Some Code - not extra lines of meta data. </code></pre> >>> md.Meta {} Copyright 2007-2008 [Waylan Limberg](http://achinghead.com). Project website: <http://packages.python.org/Markdown/meta_data.html> Contact: markdown@freewisdom.org License: BSD (see ../LICENSE.md for details) i ( t absolute_import( t unicode_literalsi ( t Extensioni ( t PreprocessorNu1 ^[ ]{0,3}(?P<key>[A-Za-z0-9_-]+):\s*(?P<value>.*)u ^[ ]{4,}(?P<value>.*)t MetaExtensionc B@ s e Z d Z d � Z RS( u* Meta-Data extension for Python-Markdown. c C@ s | j j d t | � d � d S( u, Add MetaPreprocessor to Markdown instance. u metau _beginN( t preprocessorst addt MetaPreprocessor( t selft mdt md_globals( ( s<