fix: prevent table content overflow in Markdown reports

Add CSS properties to ensure table cells wrap long content properly:
- table-layout: fixed for consistent column widths
- word-wrap and overflow-wrap: break-word for content wrapping

Co-Authored-By: Claude (glm-5) <noreply@anthropic.com>
This commit is contained in:
Misaka_Company
2026-02-27 14:14:15 +08:00
parent 3b7c00377f
commit f1d42ad708

View File

@@ -292,11 +292,14 @@ class DeleteProgressWindow:
border-collapse: collapse;
width: 100%;
margin: 10px 0;
table-layout: fixed;
}}
th, td {{
border: 1px solid #bdc3c7;
padding: 8px;
text-align: left;
word-wrap: break-word;
overflow-wrap: break-word;
}}
th {{
background-color: #3498db;
@@ -341,8 +344,8 @@ class DeleteProgressWindow:
'body { font-family: "Microsoft YaHei", Arial, sans-serif; font-size: 12px; padding: 10px; }',
"h1 { color: #2c3e50; border-bottom: 2px solid #3498db; padding-bottom: 10px; }",
"h2 { color: #34495e; border-bottom: 1px solid #bdc3c7; margin-top: 20px; }",
"table { border-collapse: collapse; width: 100%; margin: 10px 0; }",
"th, td { border: 1px solid #bdc3c7; padding: 8px; text-align: left; }",
"table { border-collapse: collapse; width: 100%; margin: 10px 0; table-layout: fixed; }",
"th, td { border: 1px solid #bdc3c7; padding: 8px; text-align: left; word-wrap: break-word; overflow-wrap: break-word; }",
"th { background-color: #3498db; color: white; }",
"</style></head><body>",
]