forked from 00dani/lemoncurry
Whoops, filter out the separators between paragraphs when calculating entry.paragraphs
This commit is contained in:
parent
08b44ccee6
commit
d2b7ed5d02
1 changed files with 3 additions and 1 deletions
|
@ -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):
|
||||||
|
|
Loading…
Reference in a new issue