Skip to content

Commit f1b16d8

Browse files
authored
Update parse.py
Fix bug with #28
1 parent 6d6f1df commit f1b16d8

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/openparse/tables/pymupdf/parse.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ def output_to_html(headers: List[str], rows: List[List[str]]) -> str:
2222

2323

2424
def output_to_markdown(headers: List[str], rows: List[List[str]]) -> str:
25-
markdown_output = "| " + " | ".join(headers) + " |\n"
25+
markdown_output = ""
26+
for header in headers:
27+
markdown_output += "|" + (header or "")
28+
markdown_output += " |\n"
2629
markdown_output += "|---" * len(headers) + "|\n"
2730

2831
for row in rows:

0 commit comments

Comments
 (0)