mirror of https://gitlab.com/bashrc2/epicyon
Get the first line
parent
818a920365
commit
dbd9acbc9d
2
blog.py
2
blog.py
|
@ -388,6 +388,8 @@ def _getSnippetFromBlogContent(postJsonObject: {}) -> str:
|
||||||
if '</p>' in content:
|
if '</p>' in content:
|
||||||
content = content.split('</p>', 1)[0]
|
content = content.split('</p>', 1)[0]
|
||||||
content = removeHtml(content)
|
content = removeHtml(content)
|
||||||
|
if '\n' in content:
|
||||||
|
content = content.split('\n')[0]
|
||||||
if len(content) >= 256:
|
if len(content) >= 256:
|
||||||
content = content[:252] + '...'
|
content = content[:252] + '...'
|
||||||
return content
|
return content
|
||||||
|
|
Loading…
Reference in New Issue