view piecrust/formatting/markdownformatter.py @ 8:ff07f6d23450

Update the `requirements` file.
author Ludovic Chabant <ludovic@chabant.com>
date Sat, 16 Aug 2014 15:16:31 -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)