fix: ql-image-mask extra div

This commit is contained in:
xtaodada 2024-05-16 17:26:15 +08:00
parent 25be4747c7
commit ea26dddbde
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659

View File

@ -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)