From ea26dddbdec1d0bb6879c35187cc3fb0086c777f Mon Sep 17 00:00:00 2001 From: xtaodada Date: Thu, 16 May 2024 17:26:15 +0800 Subject: [PATCH] fix: ql-image-mask extra div --- src/render/article.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/render/article.py b/src/render/article.py index fdc8d1c..1536e4c 100644 --- a/src/render/article.py +++ b/src/render/article.py @@ -91,6 +91,8 @@ def parse_tag(tag: Union[Tag, PageElement], post_info: PostInfo) -> str: elif tag.name == "div": post_text = [] for tag_ in tag.children: + if isinstance(tag_, Tag) and tag_.name == "div" and "ql-image-mask" in tag_["class"]: + continue if text := parse_tag(tag_, post_info): post_text.append(text) return "\n".join(post_text)