exporter writes not-quite-valid HTML
Minor Issue
Here is an HTML file exported from gnumeric:
It fails HTML validation
Fix
The <a> tag should come after the <p> tag, not before it. Here is a corrected file:
Here is the diff. Very simple and localized:
--- tables-orig.html 2023-11-04 11:54:58.491970004 -0700
+++ tables.html 2023-11-04 12:11:21.775044917 -0700
@@ -20,8 +20,8 @@
</style>
</head>
<body>
-<a name="s=xxx"></a>
-<p></p><table cellspacing="0" cellpadding="3">
+<p><a name="s=xxx"></a></p>
+<table cellspacing="0" cellpadding="3" id="xxx">
<caption>xxx</caption>
<tr>
<td valign="bottom" align="left" style=" font-size:12pt;">XXXXXXXX</td>
@@ -48,8 +48,8 @@
<td valign="bottom" align="left" style=" font-size:12pt;">XXXXXXXX</td>
</tr>
</table>
-<a name="s=abc"></a>
-<p></p><table cellspacing="0" cellpadding="3">
+<p><a name="s=abc"></a></p>
+<table cellspacing="0" cellpadding="3" id="abc">
<caption>abc</caption>
<tr>
<td valign="bottom" align="left" style=" font-size:12pt;">a</td>
Circumstances
This is observed in a version compiled from freshly-pulled git sources.
Older versions e.g. gnumeric version '1.12.51' do not exhibit this bug, because they generate no <a> tags at all.