Don't add space between neighboring tags where there wasn't any.

master
Ethan Dalool 2019-08-25 12:54:03 -07:00
parent b47701ec3a
commit fd1d0cd51f
1 changed files with 6 additions and 0 deletions

View File

@ -42,8 +42,14 @@ def remove_unwanted_stylesheets(html):
@html_cleaner @html_cleaner
def merge_neighboring_sametag(html): def merge_neighboring_sametag(html):
html = re.sub(r'</i><i>', '', html)
html = re.sub(r'</i>\s*<i>', ' ', html) html = re.sub(r'</i>\s*<i>', ' ', html)
html = re.sub(r'</b><b>', '', html)
html = re.sub(r'</b>\s*<b>', ' ', html) html = re.sub(r'</b>\s*<b>', ' ', html)
html = re.sub(r'</small><small>', '', html)
html = re.sub(r'</small>\s*<small>', ' ', html)
return html return html
@html_cleaner @html_cleaner