michaelrsweet/htmldoc

Table row without closing tag no longer rendered correctly

howff opened this issue · 7 comments

howff commented

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.

What version of HTMLDOC did you use previously?

howff commented

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).

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

howff commented

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>

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 (2c47d1f) I made a little over 4 years ago,

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

Thanks very much :-)