Fully strip title and body after SENTENCE_SPLITTER search

This commit is contained in:
Philip Douglass 2016-01-25 15:29:46 -05:00
parent 3b7508eac6
commit b2147d53c5

View file

@ -209,4 +209,4 @@ def split_title(text):
punkt = SENTENCE_SPLITTER.search(text) punkt = SENTENCE_SPLITTER.search(text)
if not punkt: if not punkt:
return text, "" return text, ""
return text[:punkt.end()].rstrip(), text[punkt.end():].lstrip() return text[:punkt.end()].strip(), text[punkt.end():].strip()