Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

refs #21: fixed a bug with list id and losing content

  • Loading branch information...
commit 52f28813000bdf3083943213202cf34693ebcb06 1 parent 6310b84
@jlward jlward authored
Showing with 9 additions and 4 deletions.
  1. +9 −4 docx2html/core.py
View
13 docx2html/core.py
@@ -313,13 +313,18 @@ def get_li_nodes(li, meta_data):
(starting_ilvl > get_ilvl(el, w_namespace))):
break
+ new_numId = get_numId(el, w_namespace)
+ if new_numId is None or new_numId == -1:
+ # Not a p tag or a list item
+ yield el
+ continue
# If the list id of the next tag is different that the previous that
# means a new list being made (not nested)
+ if current_numId != new_numId:
+ # Not a subsequent list.
+ break
if is_last_li(el, meta_data, current_numId):
- new_numId = get_numId(el, w_namespace)
- if current_numId == new_numId:
- # Not a subsequent list.
- yield el
+ yield el
break
yield el

0 comments on commit 52f2881

Please sign in to comment.
Something went wrong with that request. Please try again.