We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 960f885 commit 3cdc3d6Copy full SHA for 3cdc3d6
1 file changed
readability/readability.py
@@ -290,6 +290,8 @@ def remove_unlikely_candidates(self):
290
def transform_misused_divs_into_paragraphs(self):
291
for elem in self.tags(self.html, 'div'):
292
# transform <div>s that do not contain other block elements into <p>s
293
+ #FIXME: The current implementation ignores all descendants that are not direct children of elem
294
+ # This results in incorrect results in case there is an <img> buried within an <a> for example
295
if not REGEXES['divToPElementsRe'].search(unicode(''.join(map(tostring, list(elem))))):
296
#self.debug("Altering %s to p" % (describe(elem)))
297
elem.tag = "p"
0 commit comments