Only insert one \n since tg inore two \n

This commit is contained in:
2023-02-07 12:14:40 +08:00
parent d7dec61364
commit 7ffcb6a28a

View File

@@ -140,7 +140,7 @@ class HTMLSimpleParser(HTMLParser):
self.tagContent[-2].add(
f"<{tag}{self.tagAttrs[-1]}>{self.tagContent[-1].export()}</{tag}>")
elif tag in ['p']:
tmp = '' if self.data == '' else '\n\n'
tmp = '' if self.data == '' else '\n'
if len(self.tagName) == 1:
self.data += tmp + self.tagContent[-1].export()
else: