✨ Count content length when truncate
This commit is contained in:
parent
615fe3ff6c
commit
e906874b2e
@ -481,6 +481,7 @@ func TruncatePostContent(post models.Post) models.Post {
|
||||
post.Body["content"] = string([]rune(val)[:length]) + "..."
|
||||
post.Body["content_truncated"] = true
|
||||
}
|
||||
post.Body["content_length"] = len([]rune(val))
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user