'End a list'

def e_text_list(self, tag, attrs):

    self.writedata()
    if self.list_class_stack:
        self.list_class_stack.pop()
    name = attrs.get((TEXTNS, 'style-name'))
    level = (self.tagstack.count_tags(tag) + 1)
    if name:
        name = name.replace('.', '_')
    else:
        name = self.tagstack.rfindattr((TEXTNS, 'style-name'))
    list_class = ('%s_%d' % (name, level))
    self.closetag(self.listtypes.get(list_class, 'ul'))
    self.purgedata()
