def get_html(body, markup_type): if markup_type == 'textile': from utils.external.textile import textile return textile.textile(body) return body
def repl(tmatch): if tmatch: # Assume latin-1. Will be converted by Bloog. return textile.textile(tmatch.group(1), encoding='latin-1', output='latin-1')