This commit is contained in:
Yuzhong Zhang 2025-04-20 11:40:05 +08:00 committed by GitHub
commit f5411f2a41
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -95,6 +95,8 @@ class _CustomMarkdownify(markdownify.MarkdownConverter):
src = el.attrs.get("src", None) or ""
title = el.attrs.get("title", None) or ""
title_part = ' "%s"' % title.replace('"', r"\"") if title else ""
# Remove all line breaks from alt
alt = alt.replace("\n", " ")
if (
convert_as_inline
and el.parent.name not in self.options["keep_inline_images_in"]