Whoops, filter out the separators between paragraphs when calculating entry.paragraphs

This commit is contained in:
Danielle McLean 2017-10-27 19:49:22 +11:00
parent 08b44ccee6
commit d2b7ed5d02
Signed by: 00dani
GPG key ID: 5A5D2D1AFF12EEC5

View file

@ -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):