aboutsummaryrefslogtreecommitdiff
path: root/mammoth
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2013-12-14 15:29:59 +0000
committerMichael Williamson <mike@zwobble.org>2013-12-14 15:29:59 +0000
commitde040b5c92e20d0b578be0cc4b63e032ae5698bc (patch)
tree96ff0aae287379a535e7e6b711741ed8ffcb1f11 /mammoth
parent8cf77f91fa81823af6c84ed7ca97a3a21dc89d6b (diff)
Handle element freshness when satisfying HTML paths
Diffstat (limited to 'mammoth')
-rw-r--r--mammoth/html_generation.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mammoth/html_generation.py b/mammoth/html_generation.py
index 90a1401..66f2719 100644
--- a/mammoth/html_generation.py
+++ b/mammoth/html_generation.py
@@ -79,7 +79,7 @@ def satisfy_html_path(generator, path):
def _find_first_unsatisfied_index(generator, path):
for index, (generated_element, path_element) in enumerate(zip(generator._stack, path.elements)):
- if generated_element.name not in path_element.names:
+ if generated_element.name not in path_element.names or path_element.fresh:
return index
return len(generator._stack)