diff options
Diffstat (limited to 'mammoth/style_reader')
| -rw-r--r-- | mammoth/style_reader/document_matcher_reader.py | 2 | ||||
| -rw-r--r-- | mammoth/style_reader/html_path_reader.py | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/mammoth/style_reader/document_matcher_reader.py b/mammoth/style_reader/document_matcher_reader.py index 4bc7247..44a9896 100644 --- a/mammoth/style_reader/document_matcher_reader.py +++ b/mammoth/style_reader/document_matcher_reader.py @@ -37,7 +37,7 @@ def _read_style_node(style_node): def _read_list_node(list_node): if list_node.children: return documents.numbering_level( - int(list_node.children[0].children[3].text), + int(list_node.children[0].children[3].text) - 1, is_ordered=list_node.children[0].children[1].text == "ordered-list", ) else: diff --git a/mammoth/style_reader/html_path_reader.py b/mammoth/style_reader/html_path_reader.py index 0f1331b..b508f59 100644 --- a/mammoth/style_reader/html_path_reader.py +++ b/mammoth/style_reader/html_path_reader.py @@ -49,18 +49,18 @@ def _repeated_children_with_separator(node, has_whitespace): yield node.children[0] if has_whitespace: - sequence_node_index = 2 + sequence_node_index = 3 else: sequence_node_index = 1 - sequence_node = node.children[sequence_node_index] + sequence_node = node.children[1] for child in sequence_node.children: yield child.children[sequence_node_index] grammar_text = r""" -html_path = element whitespace* (">" whitespace* element)* +html_path = element (whitespace* ">" whitespace* element)* element = tag_names class_name* fresh? |
