diff --git a/Anav/plugin.py b/Anav/plugin.py index 60e2494..c34f4e6 100644 --- a/Anav/plugin.py +++ b/Anav/plugin.py @@ -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)