Coverage for markupmirror.markup.textile_: 89%

# Coverage for markupmirror.markup.textile_ : 89%

## 18 statements 16 run 2 missing 0 excluded

Hot-keys on this page

r m x p toggle line displays

j k next/prev highlighted chunk

0 (zero) top of page

1 (one) first highlighted chunk

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | from django.utils.translation import ugettext_lazy as _ from markupmirror import settings from markupmirror.markup.base import BaseMarkup from markupmirror.markup.base import register_markup class TextileMarkup(BaseMarkup): """Markup transformer for `Textile`_ content. .. _Textile: http://www.textism.com/tools/textile/ """ codemirror_mode = 'text/plain' title = _(u"Textile") def __init__(self): self.textile_settings = settings.MARKUPMIRROR_TEXTILE_SETTINGS self.textile = textile def convert(self, markup): return self.textile(markup, **self.textile_settings) # Only register if textile is installed try: from textile import textile register_markup(TextileMarkup) except ImportError: pass __all__ = ('TextileMarkup',)