fix image duplication caused by both an img tag and a Image object for the same image are defined in a payload.

todos-and-issues
Alain St-Denis 2024-02-09 18:09:49 -05:00
rodzic 4868291747
commit b190626bb9
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -966,7 +966,7 @@ class Note(Object, RawContentMixin):
if hasattr(child, 'to_base'):
child = child.to_base()
if isinstance(child, Image):
if child.inline or (child.image and child.image in self.raw_content):
if child.inline or self._soup.find('img', src=child.url):
continue
children.append(child)
self._cached_children = children