Skip to content

Commit b685120

Browse files
committed
Fix tables with empty first cell
If the first cell of a table is empty, no entry was created for in in the markdown table. This resulted in markdown tables which do parse properly.
1 parent a3ed67b commit b685120

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

html2text/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,7 @@ def link_url(self: HTML2Text, link: str, title: str = "") -> None:
693693
self.o("</" + config.TABLE_MARKER_FOR_PAD + ">")
694694
self.o(" \n")
695695
if tag in ["td", "th"] and start:
696-
if self.split_next_td:
696+
if self.split_next_td or self.table_start:
697697
self.o("| ")
698698
self.split_next_td = True
699699

0 commit comments

Comments
 (0)