def get_html(body, markup_type): if markup_type == 'textile': from external.libs import textile return textile.textile(body) return body
def repl(tmatch): if tmatch: return textile.textile(tmatch.group(1))