src/cm/utils/spannifier.py
changeset 270 05a602160c58
parent 0 40c8f766c9b8
child 450 81fa74c112b8
equal deleted inserted replaced
269:729e3ff85d77 270:05a602160c58
    10 def is_real_text_node(textNode):
    10 def is_real_text_node(textNode):
    11     return not textNode.findParent('style') 
    11     return not textNode.findParent('style') 
    12 
    12 
    13 def get_the_soup(input):
    13 def get_the_soup(input):
    14     return BeautifulSoup(input, convertEntities=["xml", "html"])
    14     return BeautifulSoup(input, convertEntities=["xml", "html"])
    15                      
    15      
       
    16 from cm.utils.cache import memoize, dj_memoize
       
    17 @dj_memoize
    16 def spannify(input):
    18 def spannify(input):
    17     """ 
    19     """ 
    18     wrap textNodes in spans 
    20     wrap textNodes in spans 
    19     """
    21     """
    20     
    22