Merge commit 'd63e5ae6a77e5f39e25d87500c67488ff4570cbc' into jpg

This commit is contained in:
2024-04-07 23:13:27 +02:00
3 changed files with 34 additions and 3 deletions

View File

@ -29,7 +29,9 @@ def write_file(filename, text):
### Replace ###
def convert_pattern(text):
text = re.sub(re_usage, '', text, flags=re.MULTILINE)
text, success = re.subn(re_usage, '', text, flags=re.MULTILINE)
if (success == 0):
return text
soup = BeautifulSoup(text, features="html.parser")
@ -40,7 +42,7 @@ def convert_pattern(text):
calloutTitle = BeautifulSoup(callout_title_html, features="html.parser")
tag.insert_before(calloutTitle)
return str(soup)
return (soup.decode(False, formatter=None))
### Execution ###