fix: Proper heading support in rich tables for HTML backend (#2394)

* Fix for the proper headers support in rich tables in HTML

Signed-off-by: Maksym Lysak <mly@zurich.ibm.com>

* cleaning up

Signed-off-by: Maksym Lysak <mly@zurich.ibm.com>

* Compatibility with older Python versions

Signed-off-by: Maksym Lysak <mly@zurich.ibm.com>

* Fixing Furniture before the first heading rule

Signed-off-by: Maksym Lysak <mly@zurich.ibm.com>

* Added minimalistic test case

Signed-off-by: Maksym Lysak <mly@zurich.ibm.com>

* added html for the test

Signed-off-by: Maksym Lysak <mly@zurich.ibm.com>

---------

Signed-off-by: Maksym Lysak <mly@zurich.ibm.com>
Co-authored-by: Maksym Lysak <mly@zurich.ibm.com>
This commit is contained in:
Maxim Lysak
2025-10-07 15:57:32 +02:00
committed by GitHub
parent 8a4b946a1a
commit 9705f4020c
5 changed files with 267 additions and 15 deletions

23
tests/data/html/table_with_heading.html vendored Normal file
View File

@@ -0,0 +1,23 @@
<html>
<head>
<style>
table, th, td {border: 1px solid black; border-collapse: collapse;}
td {padding:30px;}
table {margin: 30px;}
</style>
</head>
<body>
<p>Before tha table</p>
<table>
<tr>
<td><h1>A</h1></td>
<td>B</td>
</tr>
<tr>
<td>1...</td>
<td>2...</td>
</tr>
</table>
After the table
</body>
</html>