htmldoc icon indicating copy to clipboard operation
htmldoc copied to clipboard

Table row without closing tag no longer rendered correctly

Open howff opened this issue 3 years ago • 4 comments

HTML table rows without a closing tag </tr> are no longer rendered correctly. I tried with --no-strict but it made no difference. No dangling errors are reported with --strict anyway. Previous versions of htmldoc worked fine.

howff avatar Sep 29 '22 20:09 howff

What version of HTMLDOC did you use previously?

michaelrsweet avatar Sep 29 '22 20:09 michaelrsweet

Sorry the machine I used to use has been wiped so I can't find out which version but it's safe to say it would have been several years ago (possibly 2014-2016).

howff avatar Sep 30 '22 09:09 howff

Ok well please provide a sample html file that isn’t converting properly and I’ll look at it.

michaelrsweet avatar Sep 30 '22 11:09 michaelrsweet

Here's two tables, one works and the other doesn't

<html><head><title>Title</title></head><body>
		<h1>Table is rendered incorrectly</h1>
		<table>
			<tr>
				<th>Heading 1
				<th>Heading 2
			<tr>
				<td>Col 1
				<td>Col 2
		</table>
		<h1>Table is OK because &lt;/tr&gt;</h1>
		<table>
			<tr>
				<th>Heading 1
				<th>Heading 2
			</tr>
			<tr>
				<td>Col 1
				<td>Col 2
			</tr>
		</table>
	</body>
</html>

howff avatar Sep 30 '22 12:09 howff

OK, thanks I've reproduced the issue. This might have changed between some 1.8.x release and the current one - might be a regression from a fix (2c47d1f88765bbfc77dffa5b885fbc3f386a3ddb) I made a little over 4 years ago,

michaelrsweet avatar Oct 10 '22 19:10 michaelrsweet

[master c897072] Fix handling of missing close TRs (Issue #494)

michaelrsweet avatar Feb 11 '24 16:02 michaelrsweet

Thanks very much :-)

howff avatar Feb 11 '24 16:02 howff