@@ -55,11 +55,11 @@ def replace_tables_with_rendered_html(pattern, table_list, render=True):
5555 table_list .append (raw_table )
5656 if separate_tables :
5757 # Skip this match (i.e., remove it)
58- new_text += working_text [last_end : match .start ()] + "\n \n "
58+ new_text += working_text [last_end : match .start ()] + "\n "
5959 else :
6060 # Replace with rendered HTML
6161 html_table = markdown (raw_table , extensions = ["markdown.extensions.tables" ]) if render else raw_table
62- new_text += working_text [last_end : match .start ()] + html_table + "\n \n "
62+ new_text += working_text [last_end : match .start ()] + html_table + "\n "
6363 last_end = match .end ()
6464 new_text += working_text [last_end :]
6565 return new_text
@@ -75,7 +75,7 @@ def replace_tables_with_rendered_html(pattern, table_list, render=True):
7575 """ ,
7676 re .VERBOSE ,
7777 )
78- working_text = replace_tables_with_rendered_html (border_table_pattern , tables , render = separate_tables )
78+ working_text = replace_tables_with_rendered_html (border_table_pattern , tables )
7979
8080 # Borderless Markdown table
8181 no_border_table_pattern = re .compile (
@@ -87,7 +87,7 @@ def replace_tables_with_rendered_html(pattern, table_list, render=True):
8787 """ ,
8888 re .VERBOSE ,
8989 )
90- working_text = replace_tables_with_rendered_html (no_border_table_pattern , tables , render = separate_tables )
90+ working_text = replace_tables_with_rendered_html (no_border_table_pattern , tables )
9191
9292 # Replace any TAGS e.g. <table ...> to <table>
9393 TAGS = ["table" , "td" , "tr" , "th" , "tbody" , "thead" , "div" ]
@@ -139,9 +139,9 @@ def replace_html_tables():
139139 raw_table = match .group ()
140140 tables .append (raw_table )
141141 if separate_tables :
142- new_text += working_text [last_end : match .start ()] + "\n \n "
142+ new_text += working_text [last_end : match .start ()] + "\n "
143143 else :
144- new_text += working_text [last_end : match .start ()] + raw_table + "\n \n "
144+ new_text += working_text [last_end : match .start ()] + raw_table + "\n "
145145 last_end = match .end ()
146146 new_text += working_text [last_end :]
147147 working_text = new_text
0 commit comments