From d2b7ed5d02ec340307bc5961b7ace0b74529fd2e Mon Sep 17 00:00:00 2001 From: Danielle McLean Date: Fri, 27 Oct 2017 19:49:22 +1100 Subject: [PATCH] Whoops, filter out the separators between paragraphs when calculating entry.paragraphs --- entries/models.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/entries/models.py b/entries/models.py index 9b89427..84bdc36 100644 --- a/entries/models.py +++ b/entries/models.py @@ -63,7 +63,9 @@ class Entry(ModelMeta, models.Model): @property def paragraphs(self): lines = self.content.splitlines() - return ["\n".join(para) for k, para in groupby(lines, key=bool)] + return [ + "\n".join(para) for k, para in groupby(lines, key=bool) if k + ] @property def twitter_creator(self):