Skip to content

write_html: say that a table nested in a table cell is unsupported - #2052

Merged
andersonhc merged 1 commit into
py-pdf:masterfrom
RavSinghChandan:html-nested-table-error
Oct 22, 2026
Merged

andersonhc merged 1 commit into
py-pdf:masterfrom
RavSinghChandan:html-nested-table-error

Conversation

@RavSinghChandan

Copy link
Copy Markdown

A <table> inside a <td> or <th>, common in HTML emails, made write_html() fail with a bare AssertionError and no message. Other unsupported tags inside a cell already raise NotImplementedError: Unsupported nested HTML tags inside <td> element: <...>.

A nested table now raises that same NotImplementedError, naming the cell and <table>, so the user knows what is not supported. Added a test for <td> and <th>.

@andersonhc
andersonhc merged commit d31d8f8 into py-pdf:master Oct 22, 2026
23 checks passed
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