Loading helpers/md_and_html_convertor.py +1 −1 Original line number Diff line number Diff line Loading @@ -214,7 +214,7 @@ class MdAndHTMLConvertor: # br.decompose() # PwnDoc doesn't allow <br> as a top level tag. Replace it with <p><br></p> children = bs.findChildren("br") children = bs.find_all("br", recursive=False) for br_child in children: sup = bs.new_tag('p').contents = bs.new_tag("br") br_child.insert_after(sup) # todo: optimize this - together with the call above it takes > 60% of the time Loading Loading
helpers/md_and_html_convertor.py +1 −1 Original line number Diff line number Diff line Loading @@ -214,7 +214,7 @@ class MdAndHTMLConvertor: # br.decompose() # PwnDoc doesn't allow <br> as a top level tag. Replace it with <p><br></p> children = bs.findChildren("br") children = bs.find_all("br", recursive=False) for br_child in children: sup = bs.new_tag('p').contents = bs.new_tag("br") br_child.insert_after(sup) # todo: optimize this - together with the call above it takes > 60% of the time Loading