微调HTML汇报样式

This commit is contained in:
qingxu fu authored and binary-husky committed 2023-10-20 10:43:04 +08:00
1 parent a6e7bbbd22
commit 4305ee0313
2 files changed
+6 -6

No files matched your search

+4 -4
View File
@@ -24,17 +24,17 @@ class construct_html():
"""
template_ = template
if len(a.split('\n')) == 1:
template_ = template_.replace("__PRIMARY_HEADER__", markdown_convertion(a[:10]) + ' ...')
template_ = template_.replace("__PRIMARY_HEADER__", a[:20])
template_ = template_.replace("__PRIMARY_MSG__", markdown_convertion(a))
else:
template_ = template_.replace("__PRIMARY_HEADER__", markdown_convertion(a.split('\n')[0]))
template_ = template_.replace("__PRIMARY_HEADER__", a.split('\n')[0])
template_ = template_.replace("__PRIMARY_MSG__", markdown_convertion('\n'.join(a.split('\n')[1:])))
if len(b.split('\n')) == 1:
template_ = template_.replace("__SECONDARY_HEADER__", markdown_convertion(b[:10]) + ' ...')
template_ = template_.replace("__SECONDARY_HEADER__", b[:20])
template_ = template_.replace("__SECONDARY_MSG__", markdown_convertion(b))
else:
template_ = template_.replace("__SECONDARY_HEADER__", markdown_convertion(b.split('\n')[0]))
template_ = template_.replace("__SECONDARY_HEADER__", b.split('\n')[0])
template_ = template_.replace("__SECONDARY_MSG__", markdown_convertion('\n'.join(b.split('\n')[1:])))
self.html_string += template_