Skip to content

Commit

Permalink
tabled header based on cell count, tablulate returns a broken table o…
Browse files Browse the repository at this point in the history
…therwise
  • Loading branch information
iammosespaulr committed Nov 26, 2024
1 parent 67cd949 commit b9de2fb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tabled/formats/html.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@ def html_format(cells: List[SpanTableCell]):
md_row.append(cell)
md_rows.append(md_row)

md = tabulate(md_rows, headers="firstrow", tablefmt="html", disable_numparse=True)
headers = "firstrow" if len(cells) > 1 else ""
md = tabulate(md_rows, headers=headers, tablefmt="html", disable_numparse=True)
return md

0 comments on commit b9de2fb

Please sign in to comment.