@@ -598,12 +598,6 @@ def main():
598
598
print_success = False
599
599
if use_rich and code_lang == "markdown" and not line_numbers :
600
600
all_code = rich_helper .fix_emoji_spacing (all_code )
601
- all_code = all_code .replace ("<br />" , "\n " )
602
- all_code = all_code .replace ('<p align="center">' , "\n " )
603
- all_code = all_code .replace ('<p align="left">' , "\n " )
604
- all_code = all_code .replace ('<p align="right">' , "\n " )
605
- all_code = all_code .replace ("<p>" , "\n " )
606
- all_code = all_code .replace ("</p>" , "\n " )
607
601
if "<b>*" not in all_code and "*<b>" not in all_code :
608
602
if "</b>*" not in all_code and "*</b>" not in all_code :
609
603
all_code = all_code .replace ("<b>" , "**" )
@@ -617,6 +611,16 @@ def main():
617
611
all_code = all_code .replace ("\n <h2>" , "\n # " ).replace ("</h2>" , "" )
618
612
all_code = all_code .replace ("\n <h3>" , "\n # " ).replace ("</h3>" , "" )
619
613
all_code = all_code .replace ("\n <h4>" , "\n # " ).replace ("</h4>" , "" )
614
+ all_code = rich_helper .get_code_without_tag (all_code , "summary" )
615
+ all_code = rich_helper .get_code_without_tag (all_code , "details" )
616
+ all_code = rich_helper .get_code_without_tag (all_code , "span" )
617
+ all_code = rich_helper .get_code_without_tag (all_code , "div" )
618
+ all_code = rich_helper .get_code_without_tag (all_code , "img" )
619
+ all_code = rich_helper .get_code_without_tag (all_code , "li" )
620
+ all_code = rich_helper .get_code_without_tag (all_code , "ul" )
621
+ all_code = rich_helper .get_code_without_tag (all_code , "a" )
622
+ all_code = rich_helper .get_code_without_tag (all_code , "p" )
623
+ all_code = all_code .replace ("<br />" , "\n " )
620
624
print_success = rich_helper .display_markdown (all_code )
621
625
if all_code .endswith ("\n " ):
622
626
print () # Because "rich" skips the last line if new-line
0 commit comments