Get the first line

This commit is contained in:
bashrc committed 2021-05-15 20:43:42 +01:00
1 parent 818a920365
commit dbd9acbc9d
1 file changed
+2
+2
View File
@@ -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