From 41f88f5830a753d847b2707fce811807de40213a Mon Sep 17 00:00:00 2001 From: Josiah Outram Halstead Date: Wed, 17 Jan 2024 11:12:13 +0000 Subject: [PATCH] Add unit test --- test/test_html2text.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/test_html2text.py b/test/test_html2text.py index f57cb6b..4bebf23 100644 --- a/test/test_html2text.py +++ b/test/test_html2text.py @@ -236,3 +236,12 @@ def _skip_certain_tags(h2t, tag, attrs, start): "some italics too." ) assert ret == "this is a txt and this is a with text and some _italics_ too.\n\n" + + +def test_table_empty_first_cell(): + h = html2text.HTML2Text() + ret = h.handle( + "" + "
b
cd
" + ).strip().replace(" ", "") + assert ret == "||b\n---|---\nc|d"