From 2c30bbc4b0574b7ee8a47001c6065d60008716d6 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Sat, 12 Jun 2021 17:20:21 +0300 Subject: [PATCH] fix tags gluing --- src/components/rich_content/rich_content.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/rich_content/rich_content.jsx b/src/components/rich_content/rich_content.jsx index a489689b..ad77d615 100644 --- a/src/components/rich_content/rich_content.jsx +++ b/src/components/rich_content/rich_content.jsx @@ -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)) {