Merge pull request #41 from xingty/fix-telegraph

Fixed issue with <a> tags not working in Telegraph.
This commit is contained in:
yihong 2024-07-03 20:36:02 +08:00 committed by GitHub
commit 7b4ab94a3e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -402,7 +402,7 @@ class TelegraphAPI:
] ]
if element.attrs: if element.attrs:
tag_dict["attributes"] = element.attrs tag_dict["attrs"] = element.attrs
if element.contents: if element.contents:
children = [] children = []
for child in element.contents: for child in element.contents:
@ -413,7 +413,7 @@ class TelegraphAPI:
tag_dict["children"] = children tag_dict["children"] = children
else: else:
if element.attrs: if element.attrs:
tag_dict["attributes"] = element.attrs tag_dict["attrs"] = element.attrs
if element.contents: if element.contents:
children = [] children = []
for child in element.contents: for child in element.contents: