Fixed post excert rendering

This commit is contained in:
Grzegorz Leoniec 2019-02-06 17:20:11 +01:00
parent 81d19cbc16
commit a881b266a6
No known key found for this signature in database
GPG Key ID: 3AA43686D4EB1377

View File

@ -87,7 +87,7 @@ export default {
computed: {
excerpt() {
// remove all links from excerpt to prevent issues with the serounding link
let excerpt = this.post.contentExcerpt.replace(/<a.*>(.+)<\/a>/gim, '')
let excerpt = this.post.contentExcerpt.replace(/<a.*>(.+)<\/a>/gim, '$1')
// do not display content that is only linebreaks
if (excerpt.replace(/<br>/gim, '').trim() === '') {
excerpt = ''