fix table generate

This commit is contained in:
Sarah 2022-12-10 16:40:25 +00:00
parent e9a5b0ee51
commit d64621aa73

View File

@ -18,10 +18,10 @@ class MarkdownTable:
self.rows.append(row_data)
def __str__(self):
table = "| "
table = "|"
for header in self.headers:
table += "{} | ".format(header)
table += " {} |".format(header)
table += "\n"
@ -30,6 +30,6 @@ class MarkdownTable:
for row in self.rows:
table += "\n"
table += " | ".join(row)
table += " | ".join(map(str, row))
return table