def typogrify(data): if typo is None: req_missing(['typogrify'], 'use the typogrify filter') data = typo.amp(data) data = typo.widont(data) data = typo.smartypants(data) # Disabled because of typogrify bug where it breaks <title> # data = typo.caps(data) data = typo.initial_quotes(data) return data
def typogrify(data): if typo is None: req_missing(['typogrify', 'use the typogrify filter']) data = typo.amp(data) data = typo.widont(data) data = typo.smartypants(data) # Disabled because of typogrify bug where it breaks <title> # data = typo.caps(data) data = typo.initial_quotes(data) return data
def typogrify(data): global typogrify_filter if typo is None: raise Exception("To use the typogrify filter, you need to install typogrify.") data = typo.amp(data) data = typo.widont(data) data = typo.smartypants(data) # Disabled because of typogrify bug where it breaks <title> #data = typo.caps(data) data = typo.initial_quotes(data) return data
def typogrify(data): """Prettify text with typogrify.""" if typo is None: req_missing(["typogrify"], "use the typogrify filter") data = typo.amp(data) data = typo.widont(data) data = typo.smartypants(data) # Disabled because of typogrify bug where it breaks <title> # data = typo.caps(data) data = typo.initial_quotes(data) return data
def typogrify(data): global typogrify_filter if typo is None: raise Exception( "To use the typogrify filter, you need to install typogrify.") data = typo.amp(data) data = typo.widont(data) data = typo.smartypants(data) # Disabled because of typogrify bug where it breaks <title> #data = typo.caps(data) data = typo.initial_quotes(data) return data
def typogrify(data): """Prettify text with typogrify.""" if typo is None: req_missing(['typogrify'], 'use the typogrify filter', optional=True) return data data = _normalize_html(data) data = typo.amp(data) data = typo.widont(data) data = typo.smartypants(data) # Disabled because of typogrify bug where it breaks <title> # data = typo.caps(data) data = typo.initial_quotes(data) return data
def typogrify(text, ignore_tags=None): """The super typography filter Applies filters to text that are not in tags contained in the ignore_tags list. """ section_list = process_ignores(text, ignore_tags) rendered_text = "" for text_item, should_process in section_list: if should_process: rendered_text += applyfilters(text_item) else: rendered_text += text_item # apply widont at the end, as its already smart about tags. Hopefully. return widont(rendered_text)