mirror of
https://github.com/kemayo/leech
synced 2026-03-17 09:52:29 +01:00
Add note about alt="" behavior
This commit is contained in:
parent
6988fc8ccc
commit
59923e0f63
1 changed files with 1 additions and 0 deletions
|
|
@ -132,6 +132,7 @@ def chapter_html(
|
|||
else:
|
||||
# Remove all images from the chapter so you don't get that annoying grey background.
|
||||
for img in soup.find_all('img'):
|
||||
# Note: alt="" will be completely removed here, which is consitent with the semantics
|
||||
if img.parent.name.lower() == "figure":
|
||||
# TODO: figcaption?
|
||||
img.parent.replace_with(img.get('alt', '🖼'))
|
||||
|
|
|
|||
Loading…
Reference in a new issue