Mercurial > hg-website
annotate filters.py @ 259:b18d0f96829d
Merge sjl/hg-website
author | David Soria Parra <dsp@php.net> |
---|---|
date | Sun, 04 Oct 2009 04:21:47 +0200 |
parents | 3e6869f76b8d |
children |
rev | line source |
---|---|
247
3e6869f76b8d
Add the blatter config and framework files.
Steve Losh <steve@stevelosh.com>
parents:
diff
changeset
|
1 import markdown as _markdown |
3e6869f76b8d
Add the blatter config and framework files.
Steve Losh <steve@stevelosh.com>
parents:
diff
changeset
|
2 from jinja2 import Markup |
3e6869f76b8d
Add the blatter config and framework files.
Steve Losh <steve@stevelosh.com>
parents:
diff
changeset
|
3 |
3e6869f76b8d
Add the blatter config and framework files.
Steve Losh <steve@stevelosh.com>
parents:
diff
changeset
|
4 md = _markdown.Markdown(extensions=['toc'], safe_mode=False) |
3e6869f76b8d
Add the blatter config and framework files.
Steve Losh <steve@stevelosh.com>
parents:
diff
changeset
|
5 |
3e6869f76b8d
Add the blatter config and framework files.
Steve Losh <steve@stevelosh.com>
parents:
diff
changeset
|
6 def mdown(value): |
3e6869f76b8d
Add the blatter config and framework files.
Steve Losh <steve@stevelosh.com>
parents:
diff
changeset
|
7 return Markup(md.convert(value)) |