docx2html/core.py
def is_last_li(li, meta_data, current_numId):
    """
    Determine if ``li`` is the last list item for a given list
    """
    if not is_li(li, meta_data):
        return False
    w_namespace = get_namespace(li, 'w')
    next_el = li
    while True:
        # If we run out of element this must be the last list item
        if next_el is None:
            return True

        next_el = next_el.getnext()
        # Ignore elements that are not a list item
        if not is_li(next_el, meta_data):
            continue

        new_numId = get_numId(next_el, w_namespace)
        if current_numId != new_numId:
            return True
        # If we have gotten here then we have found another list item in the
        # current list, so ``li`` is not the last li in the list.
        return False
def is_last_li(li, meta_data, current_numId):
    if not is_li(li, meta_data):
        return False
    w_namespace = get_namespace(li, 'w')
    next_el = li
    while True:
        # If we run out of element this must be the last list item
        if next_el is None:
            return True

        next_el = next_el.getnext()
        # Ignore elements that are not a list item
        if not is_li(next_el, meta_data):
            continue

        new_numId = get_numId(next_el, w_namespace)
        if current_numId != new_numId:
            return True
        # If we have gotten here then we have found another list item in the
        # current list, so ``li`` is not the last li in the list.
        return False
def is_last_li ( li , meta_data , current_numId ) : if not is_li ( li , meta_data ) : return False w_namespace = get_namespace ( li , 'w' ) next_el = li while True : # If we run out of element this must be the last list item if next_el is None : return True next_el = next_el . getnext ( ) # Ignore elements that are not a list item if not is_li ( next_el , meta_data ) : continue new_numId = get_numId ( next_el , w_namespace ) if current_numId != new_numId : return True # If we have gotten here then we have found another list item in the # current list, so ``li`` is not the last li in the list. return False
Determine if ``li`` is the last list item for a given list
Determine if li is the last list item for a given list