fix tags gluing

This commit is contained in:
Henry Jameson 2021-06-12 17:20:21 +03:00 committed by Sam Therapy
parent 0e6be494e1
commit 2c30bbc4b0
Signed by: sam
GPG key ID: 4D8B07C18F31ACBD

View file

@ -141,6 +141,7 @@ export default Vue.component('RichContent', {
if (attrs['class'] && attrs['class'].includes('mention')) {
return renderMention(attrs, children, encounteredText)
} else if (attrs['class'] && attrs['class'].includes('hashtag')) {
encounteredText = true
return item // We'll handle it later
} else {
attrs.target = '_blank'
@ -167,7 +168,7 @@ export default Vue.component('RichContent', {
// Handle text nodes - just add emoji
if (typeof item === 'string') {
const emptyText = item.trim() === ''
if (emptyText) return encounteredTextReverse ? item : item.trim()
if (emptyText) return item
if (!encounteredTextReverse) encounteredTextReverse = true
return item
} else if (Array.isArray(item)) {