Files
pandoc/test/command/8257.md
T
John MacFarlaneandClaude a83dbaf989 HTML writer: use truncate consistently for table width percentages.
The overall table width used `round` while individual column widths
(in colSpecListToHtml) used `truncate`, so the table width could
exceed the sum of the column widths.  Update test goldens.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-09-20 10:28:30 -07:00

513 B

% pandoc -f markdown -t html5
+------+-------+
| Item | Price |
+======+=======+
| Eggs | 5£    |
+------+-------+
| Spam | 3£    |
+======+=======+
| Sum  | 8£    |
+======+=======+
^D
<table style="width:20%;">
<colgroup>
<col style="width: 9%" />
<col style="width: 11%" />
</colgroup>
<thead>
<tr>
<th>Item</th>
<th>Price</th>
</tr>
</thead>
<tbody>
<tr>
<td>Eggs</td>
<td>5£</td>
</tr>
<tr>
<td>Spam</td>
<td>3£</td>
</tr>
</tbody><tfoot>
<tr>
<td>Sum</td>
<td>8£</td>
</tr>
</tfoot>

</table>