mirror of
https://gitlab.com/bashrc2/epicyon
synced 2026-11-01 18:29:54 +00:00
Get the first line
This commit is contained in:
1 parent
818a920365
commit
dbd9acbc9d
1 file changed
+2
@@ -388,6 +388,8 @@ def _getSnippetFromBlogContent(postJsonObject: {}) -> str:
|
||||
if '</p>' in content:
|
||||
content = content.split('</p>', 1)[0]
|
||||
content = removeHtml(content)
|
||||
if '\n' in content:
|
||||
content = content.split('\n')[0]
|
||||
if len(content) >= 256:
|
||||
content = content[:252] + '...'
|
||||
return content
|
||||
|
||||
Reference in new issue
Block a user