Fixed truncation issue

This commit is contained in:
Eliot Berriot 2020-03-26 16:59:48 +01:00
commit 5bb9112a09
No known key found for this signature in database
GPG key ID: 6B501DFD73514E14

View file

@ -85,7 +85,7 @@ export default {
return this.content.html
},
truncatedHtml () {
return clip(this.content.html, this.truncateLength)
return clip(this.content.html, this.truncateLength, { html: true, maxLines: 3 })
},
isTruncated () {
return this.truncateLength > 0 && this.truncatedHtml.length < this.content.html.length