view piecrust/formatting/markdownformatter.py @ 16:3a13b43e77c1

Correctly set the current page on a pagination slicer.
author Ludovic Chabant <ludovic@chabant.com>
date Mon, 18 Aug 2014 16:51:38 -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)