From 2dfdf1bd4aacf3dbc1a364c672983db285e82e7d Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Mon, 14 Jul 2014 02:21:32 -0400 Subject: [PATCH] Ensure the text is stripped properly. --- earwigbot/wiki/copyvios/parsers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/earwigbot/wiki/copyvios/parsers.py b/earwigbot/wiki/copyvios/parsers.py index e0b2784..e21af0e 100644 --- a/earwigbot/wiki/copyvios/parsers.py +++ b/earwigbot/wiki/copyvios/parsers.py @@ -64,7 +64,7 @@ class ArticleTextParser(BaseTextParser): """ wikicode = mwparserfromhell.parse(self.text) clean = wikicode.strip_code(normalize=True, collapse=True) - self.clean = clean.replace("\n\n", "\n") # Collapse extra newlines + self.clean = clean.replace("\n\n", "\n").strip() return self.clean def chunk(self, nltk_dir, max_chunks, max_query=256):