예제 #1
0
def applyfilters(text):
    """Applies the following filters: smartypants, caps, amp, initial_quotes

    >>> typogrify('<h2>"Jayhawks" & KU fans act extremely obnoxiously</h2>')
    '<h2><span class="dquo">&#8220;</span>Jayhawks&#8221; <span class="amp">&amp;</span> <span class="caps">KU</span> fans act extremely&nbsp;obnoxiously</h2>'
    """
    text = amp(text)
    text = smartypants(text)
    text = caps(text)
    text = initial_quotes(text)

    return text
예제 #2
0
def applyfilters(text):
    """Applies the following filters: smartypants, caps, amp, initial_quotes

    >>> typogrify('<h2>"Jayhawks" & KU fans act extremely obnoxiously</h2>')
    '<h2><span class="dquo">&#8220;</span>Jayhawks&#8221; <span class="amp">&amp;</span> <span class="caps">KU</span> fans act extremely&nbsp;obnoxiously</h2>'
    """
    text = amp(text)
    text = smartypants(text)
    text = caps(text)
    text = initial_quotes(text)

    return text
예제 #3
0
def typogrify_no_widont(value):
    value = Typogrify.amp(value)
    value = Typogrify.smartypants(value)
    value = Typogrify.caps(value)
    value = Typogrify.initial_quotes(value)
    return value
예제 #4
0
def typogrify_no_widont(value):
    value = Typogrify.amp(value)
    value = Typogrify.smartypants(value)
    value = Typogrify.caps(value)
    value = Typogrify.initial_quotes(value)
    return value