Skip to content

Commit

Permalink
Fix table error
Browse files Browse the repository at this point in the history
  • Loading branch information
VikParuchuri committed Dec 19, 2024
1 parent 9185517 commit 9565572
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions marker/renderers/markdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,15 @@ def convert_p(self, el, text, *args):
return f"{text}"
return f"{text}\n\n" if text else "" # default convert_p behavior

def convert_td(self, el, text, convert_as_inline):
text = text.replace("|", " ").replace("\n", " ")
return super().convert_td(el, text, convert_as_inline)

def convert_th(self, el, text, convert_as_inline):
text = text.replace("|", " ").replace("\n", " ")
return super().convert_th(el, text, convert_as_inline)



class MarkdownOutput(BaseModel):
markdown: str
Expand Down

0 comments on commit 9565572

Please sign in to comment.