make sure there are blank lines around table/figure captions (#114)

Signed-off-by: chrispy <chrispy@synopsys.com>
Co-authored-by: AlexVonB <AlexVonB@users.noreply.github.com>
This commit is contained in:
Chris Papademetrious
2024-03-26 16:41:56 -04:00
committed by GitHub
parent e4df41225d
commit d5fb0fbb85
3 changed files with 20 additions and 0 deletions

View File

@@ -369,6 +369,12 @@ class MarkdownConverter(object):
def convert_table(self, el, text, convert_as_inline):
return '\n\n' + text + '\n'
def convert_caption(self, el, text, convert_as_inline):
return text + '\n'
def convert_figcaption(self, el, text, convert_as_inline):
return '\n\n' + text + '\n\n'
def convert_td(self, el, text, convert_as_inline):
return ' ' + text.strip().replace("\n", " ") + ' |'