Mercurial > piecrust2
view piecrust/formatting/markdownformatter.py @ 10:cd35d356ccce
Fix some bugs with iterators, add some unit tests.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sun, 17 Aug 2014 21:18:48 -0700 |
parents | f485ba500df3 |
children | c95c90c82263 |
line wrap: on
line source
from markdown import markdown from piecrust.formatting.base import Formatter class MarkdownFormatter(Formatter): FORMAT_NAMES = ['markdown', 'mdown', 'md'] OUTPUT_FORMAT = 'html' def render(self, format_name, txt): return markdown(txt)