Example #1
0
 def render(self, scrap_data):
     output = ""
     try:
         output += formatter(
             scrap_data['markup'],
             filter_name=scrap_data['formatter']
         )
     except ImportError:
         output += "<!-- Cannot render HTML: '" + scrap_data['formatter'] + \
             "' not found. -->"
     return output
Example #2
0
def apply_markup(text, filter_name):
    return mark_safe(formatter(text, filter_name))