Adding comment about oversight in transform_misused_divs_into_paragraphs().

pull/11/head
Jan Weiß 12 years ago
parent 960f885edf
commit 3cdc3d67af

@ -290,6 +290,8 @@ class Document:
def transform_misused_divs_into_paragraphs(self):
for elem in self.tags(self.html, 'div'):
# transform <div>s that do not contain other block elements into <p>s
#FIXME: The current implementation ignores all descendants that are not direct children of elem
# This results in incorrect results in case there is an <img> buried within an <a> for example
if not REGEXES['divToPElementsRe'].search(unicode(''.join(map(tostring, list(elem))))):
#self.debug("Altering %s to p" % (describe(elem)))
elem.tag = "p"

Loading…
Cancel
Save