微调HTML汇报样式

This commit is contained in:
qingxu fu
2023-10-16 22:37:01 +08:00
committed by binary-husky
parent a6e7bbbd22
commit 4305ee0313
2 changed files with 6 additions and 6 deletions

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_