Remove trailing spaces

This commit is contained in:
Pedro de Oliveira 2019-12-23 23:06:27 +00:00
parent 655dbf7e58
commit c10b0e87f7
1 changed files with 2 additions and 1 deletions

View File

@ -37,6 +37,7 @@ except ImportError:
# Placeholder that allows to run the plugin on a bot
# without the i18n module
_ = lambda x: x
import re
from anavnet import AnavNet
@ -58,7 +59,7 @@ class Anav(callbacks.Plugin):
position,
anavnet.get_total_messages(),
anavnet.get_message(position)['dt_inicio'],
anavnet.get_message(position)['descricao'].replace('\n',' '))
re.sub(r'\s+', ' ', anavnet.get_message(position)['descricao'].replace('\n',' ')).strip())
except Exception as e:
message = "NOP: {}".format(e)