Generated: Wed 2012-04-11 05:19 CDT
Source file: /home/buechler/Sites/django-markupmirror/markupmirror/markup/plaintext.py
Stats: 7 executed, 0 missed, 5 excluded, 15 ignored
from django.utils.html import linebreaksfrom django.utils.html import urlizefrom django.utils.translation import ugettext_lazy as _from markupmirror.markup.base import BaseMarkupfrom markupmirror.markup.base import register_markupclass PlainTextMarkup(BaseMarkup): """Markup transformer for plain-text content. This uses Django's ``urlize`` and ``linebreaks`` utitlies to convert URLs in the text to clickable links and linebreaks to ``<p>`` and ``<br />`` elements respectively. """ codemirror_mode = '' title = _(u"Plain text") def convert(self, markup): return urlize(linebreaks(markup))register_markup(PlainTextMarkup)__all__ = ('PlainTextMarkup',)