Markdown Documentation

This page contains the Markdown Package documentation.

The markdown Package

gluon.contrib.markdown.WIKI(text, encoding='utf8', safe_mode='escape', **attributes)
gluon.contrib.markdown.random()
random() -> x in the interval [0, 1).

The markdown2 Module

A fast and complete Python implementation of Markdown.

[from http://daringfireball.net/projects/markdown/] > Markdown is a text-to-HTML filter; it translates an easy-to-read / > easy-to-write structured text format into HTML. Markdown’s text > format is most similar to that of plain text email, and supports > features such as headers, emphasis, code blocks, blockquotes, and > links. > > Markdown’s syntax is designed not as a generic markup language, but > specifically to serve as a front-end to (X)HTML. You can use span-level > HTML tags anywhere in a Markdown document, and you can use block level > HTML tags (like <div> and <table> as well).

Module usage:

>>> import markdown2
>>> markdown2.markdown("*boo!*")  # or use `html = markdown_path(PATH)`
u'<p><em>boo!</em></p>\n'
>>> markdowner = Markdown()
>>> markdowner.convert("*boo!*")
u'<p><em>boo!</em></p>\n'
>>> markdowner.convert("**boom!**")
u'<p><strong>boom!</strong></p>\n'

This implementation of Markdown implements the full “core” syntax plus a number of extras (e.g., code syntax coloring, footnotes) as described on <http://code.google.com/p/python-markdown2/wiki/Extras>.

class gluon.contrib.markdown.markdown2.Markdown(html4tags=False, tab_width=4, safe_mode=None, extras=None, link_patterns=None, use_file_vars=False)

Bases: object

convert(text)
Convert the given text.
reset()
exception gluon.contrib.markdown.markdown2.MarkdownError
Bases: exceptions.Exception
class gluon.contrib.markdown.markdown2.MarkdownWithExtras(html4tags=False, tab_width=4, safe_mode=None, extras=None, link_patterns=None, use_file_vars=False)

Bases: gluon.contrib.markdown.markdown2.Markdown

A markdowner class that enables most extras:

  • footnotes
  • code-color (only has effect if ‘pygments’ Python module on path)

These are not included: - pyshell (specific to Python-related documenting) - code-friendly (because it disables part of the syntax) - link-patterns (because you need to specify some actual

System Message: ERROR/3 (/Users/mdipierro/web2py/gluon/contrib/markdown/markdown2.py:docstring of gluon.contrib.markdown.markdown2, line 9)

Unexpected indentation.
link-patterns anyway)
gluon.contrib.markdown.markdown2.main(argv=None)
gluon.contrib.markdown.markdown2.markdown(text, html4tags=False, tab_width=4, safe_mode=None, extras=None, link_patterns=None, use_file_vars=False)
gluon.contrib.markdown.markdown2.markdown_path(path, encoding='utf-8', html4tags=False, tab_width=4, safe_mode=None, extras=None, link_patterns=None, use_file_vars=False)
gluon.contrib.markdown.markdown2.random()
random() -> x in the interval [0, 1).

Table Of Contents

Previous topic

Gateways Documentation

Next topic

Memcache Documentation

This Page