def _process_markup(self): """ Returns the entry with content elements processed by markup and typogrify. """ self.summary_processed = typogrify(formatter(self.summary)) self.body_processed = typogrify(formatter(self.body)) self.footnotes_processed = typogrify(formatter(self.footnotes)) return self
def apply_markup(value, arg=None): """ Applies text-to-HTML conversion. Takes an optional argument to specify the name of a filter to use. """ if arg is not None: return mark_safe(formatter(value, filter_name=arg)) return formatter(value)