We implemented the "reconstruct the active formatting elements"
http://www.whatwg.org/specs/web-apps/current-work/#reconstruct algorithm
as follows for html5lib:
def reconstructActiveFormattingElements(self):
# Step 1 and 2.
...
# Step 3 and 4.
# XXX The specification says "and entry _not_ in" but that doesn't
# work. This seems to give correct results too...
while entry != Marker and entry in self.openElements:
i -= 1
entry = self.activeFormattingElements[i]
# Step 5 and onwards
...
Is there any testcase that could uncover this bug? Or is it a bug in the
specification? Note that if we change it to "entry not in
self.openElements" several testcases will no longer pass and exceptions
will be thrown for trying to access an element not in the list...
--
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>
_______________________________________________
implementors mailing list
[email protected]
http://lists.whatwg.org/listinfo.cgi/implementors-whatwg.org