Don't add space between neighboring tags where there wasn't any.
This commit is contained in:
parent
b47701ec3a
commit
fd1d0cd51f
1 changed files with 6 additions and 0 deletions
|
@ -42,8 +42,14 @@ def remove_unwanted_stylesheets(html):
|
|||
|
||||
@html_cleaner
|
||||
def merge_neighboring_sametag(html):
|
||||
html = re.sub(r'</i><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'</small><small>', '', html)
|
||||
html = re.sub(r'</small>\s*<small>', ' ', html)
|
||||
return html
|
||||
|
||||
@html_cleaner
|
||||
|
|
Loading…
Reference in a new issue