Skip to content

fix: Correctly handle parse errors in html tables#25

Merged
acoulton merged 2 commits into1.3.xfrom
1.3.x-fix-html5-error-reporting
Mar 10, 2026
Merged

fix: Correctly handle parse errors in html tables#25
acoulton merged 2 commits into1.3.xfrom
1.3.x-fix-html5-error-reporting

Conversation

@acoulton
Copy link
Member

When we switched to using masterminds/html5 for table parsing (in #15), the parse error detection & handling was not updated.

This is partly because there are actually very few cases in which input is actually invalid as html (as opposed to being non-conformant, which isn't checked). And we did not have test cases proving these examples.

Fixed the handling of this ahead of moving to native html parsing in 1.4 (which is treated differently anyway).

The original test data for this feature had invalid HTML (the `<time>` element was not actually in a cell).
When we switched to using masterminds/html5 for table parsing,
the parse error detection & handling was not updated.

This is partly because there are actually very few cases in
which input is actually *invalid* as html (as opposed to
being non-conformant, which isn't checked). And we did not
have test cases proving these examples.

Fixed the handling of this ahead of moving to native html
parsing in 1.4 (which is treated differently anyway).
@acoulton acoulton requested a review from craig410 March 10, 2026 11:56
Copy link
Member

@craig410 craig410 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@acoulton acoulton merged commit bfe4016 into 1.3.x Mar 10, 2026
10 checks passed
@acoulton acoulton deleted the 1.3.x-fix-html5-error-reporting branch March 10, 2026 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants