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 untrusted user: 00dani
GPG key ID: 5A5D2D1AFF12EEC5

View file

@ -63,7 +63,9 @@ class Entry(ModelMeta, models.Model):
@property @property
def paragraphs(self): def paragraphs(self):
lines = self.content.splitlines() 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 @property
def twitter_creator(self): def twitter_creator(self):