NAME§

Markdown - Markdown

FILE§

/Users/timothydavenport/GitHub/quilt/quilt

DESCRIPTION§

Custom Markdown Extensions

Adds both included and custom extensions to Python-Markdown :
1. 'markdown.extensions.extra'
2. 'markdown.extensions.nl2br'
3. 'markdown.extensions.sane_lists'
4. 'markdown.extensions.codehilite'
5. 'markdown.extensions.wikilinks'
6. 'markdown.extensions.toc'
7. ChecklistExtension()
8. SuperscriptExtension()
9. StrikethroughExtension()
10. SubscriptExtension()
11. SmallExtension()
12. DeleteExtension()
13. InsertExtension()
14. CiteExtension()
15. HighlightExtension()
16. CustomSpanClassExtension()
17. BlankLineExtension()
18. 'markdown.extensions.footnotes'
19. AetherExtension()

project : quilt
version : 0.1.1
status : development
modifydate : 2015-05-13 07:09:00 -0700
createdate : 2015-04-28 06:02:00 -0700
website : https://github.com/tmthydvnprt/quilt
author : tmthydvnprt
email : tmthydvnprt@users.noreply.github.com
maintainer : tmthydvnprt
license : MIT
copyright : Copyright 2015, quilt
credits :

MODULES§

etree, markdown, re, sys

FUNCTIONS§

def convert_checkbox(match=None'):

handle checkbox logic

CLASSES§

markdown.extensions.Extension(builtin.object)
ChecklistExtension
CustomSpanExtension
MathExtension
MultiExtension
ReplaceTagsExtension
SymbolExtension
markdown.inlinepatterns.Pattern(builtin.object)
CustomSpanPattern
MultiPattern
ReplacePattern
SymbolPattern
markdown.inlinepatterns.SimpleTagPattern(markdown.inlinepatterns.Pattern)
MathsPattern
markdown.postprocessors.Postprocessor(markdown.util.Processor)
ChecklistPostprocessor

class ChecklistExtension§

description§


adds checkbox to markdown list (e.g. [x] checked or [ ] unchecked)

methods§


def extendMarkdown(self, md, md_globals'):

Modifies inline patterns.

class ChecklistPostprocessor§

description§


post process to add checklist class to list element

methods§


def run(self, html'):

post process

class CustomSpanExtension§

description§


Adds custom span extension to Markdown class

methods§


def extendMarkdown(self, md, md_globals'):

Modifies inline patterns.

class CustomSpanPattern§

description§


custom span pattern

methods§


def handleMatch(self, matched'):

handle matched inline pattern

class MathExtension§

description§


create mathjax extension

methods§


def extendMarkdown(self, md, md_globals'):

Modifies inline patterns

class MathsPattern§

description§


match LaTeX math patterns

methods§


def handleMatch(self, m'):

replace match with span.maths

class MultiExtension§

description§


extension: multiple matches

methods§


def extendMarkdown(self, md, md_globals'):

Modifies inline patterns.

class MultiPattern§

description§


match multiple patterns

methods§


def handleMatch(self, m'):

handle matched inline pattern

class ReplacePattern§

description§


match multiple patterns

methods§


def handleMatch(self, m'):

handle matched inline pattern

class ReplaceTagsExtension§

description§


Adds line break extension to Markdown class.

methods§


def extendMarkdown(self, md, md_globals'):

Modifies inline patterns.

class SymbolExtension§

description§


pre process to add checklist class to list element

methods§


def extendMarkdown(self, md, md_globals'):

Modifies inline patterns

class SymbolPattern§

description§


match symbols and replace html entities

methods§


def handleMatch(self, m'):

replace match with span.symbol

DATA§

AMP_SUBSTITUTE

amp

CHECKBOX_RE

<li>\[([ Xx])\]

CUSTOM_CLS_RE

[!]{2}(?P<class>.+?)[|](?P<text>.+?)[!]{2}

MATHS_RE

(\$\$|\\\(|\\\[)(.+?)(\$\$|\\\)|\\\])

MD

<markdown.Markdown object at 0x109c9aed0>

MD_EXT

['markdown.extensions.extra', 'markdown.extensions.nl2br', 'markdown.extensions.sane_lists', 'markdown.extensions.codehilite', 'markdown.extensions.wikilinks', 'markdown.extensions.toc', <Markdown.ChecklistExtension object at 0x109c9ad10>, <Markdown.CustomSpanExtension object at 0x109c9ad90>, <Markdown.ReplaceTagsExtension object at 0x109c9add0>, 'markdown.extensions.footnotes', <Markdown.SymbolExtension object at 0x109c9ae10>, <Markdown.MultiExtension object at 0x109c9ae50>, <Markdown.MathExtension object at 0x109c9ae90>]

MD_EXT_CONFIG

{'markdown.extensions.wikilinks': {'end_url': '', 'base_url': 'http://en.wikipedia.org/wiki/'}, 'markdown.extensions.codehilite': {'use_pygments': False, 'guess_lang': True}, 'markdown.extensions.toc': {'permalink': u'\x02amp\x03sect;'}, 'markdown.extensions.footnotes': {'PLACE_MARKER': '///footnotes///'}}

MD_INLINE_TAGS

{'::': 'kbd', '~~': 's', '==': 'mark', '---': 'small', '***': 'u', '+++': 'big', '___': 'u', ':::': 'samp', '%': 'var', '--': 'del', '"""': 'cite', '++': 'ins', '^': 'sup', '~': 'sub'}

MULTIMATCH_RE

(\:\:|\~\~|\=\=|\-\-\-|\*\*\*|\+\+\+|\_\_\_|\:\:\:|\%|\-\-|\"\"\"|\+\+|\^|\~)(.*?)\2

REPLACE_TAGS

{'%%': 'br', '@@': 'i'}

REPLACE_TAGS_RE

( \%\% | \@\@ )

SYMBOLS

{'(v)': '%sdarr;', '(t)': '%sdagger;', '---': '%smdash;', '(oo)': '%sinfin;', '(x)': '%stimes;', '(o)': '%sdeg;', '(r)': '%sreg;', '(tm)': '%strade;', '(c)': '%scopy;', '...': '%shellip;', '1/4': '%sfrac14;', '1/2': '%sfrac12;', '3/4': '%sfrac34;', '(^)': '%suarr;', '(tt)': '%sDagger;', '(<)': '%slarr;', '--': '%sndash;', '+-': '%splusmn;', '(/)': '%sdivide;', '(f)': '%sfnof;', '(>)': '%srarr;', '(<>)': '%sharr;', '(d)': '%sdeg;'}

SYMBOLS_RE

(\(v\)|\(t\)|\-\-\-|\(oo\)|\(x\)|\(o\)|\(r\)|\(tm\)|\(c\)|\.\.\.|1\/4|1\/2|3\/4|\(\^\)|\(tt\)|\(\<\)|\-\-|\+\-|\(\/\)|\(f\)|\(\>\)|\(\<\>\)|\(d\))
markdown