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

This commit is contained in:
Ethan Dalool 2019-08-25 12:54:03 -07:00
parent b47701ec3a
commit fd1d0cd51f

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