From d872d55832cf3af43f698edd28b99f0c3c515f5c Mon Sep 17 00:00:00 2001 From: lain Date: Thu, 4 Jun 2020 15:50:44 +0200 Subject: [PATCH] StatusContent: Try to get hashtag from dataset first. --- src/components/status_content/status_content.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/status_content/status_content.js b/src/components/status_content/status_content.js index ccc01b6f..c0a71e8f 100644 --- a/src/components/status_content/status_content.js +++ b/src/components/status_content/status_content.js @@ -176,8 +176,8 @@ const StatusContent = { } } if (target.rel.match(/(?:^|\s)tag(?:$|\s)/) || target.className.match(/hashtag/)) { - // Extract tag name from link url - const tag = extractTagFromUrl(target.href) + // Extract tag name from dataset or link url + const tag = target.dataset.tag || extractTagFromUrl(target.href) if (tag) { const link = this.generateTagLink(tag) this.$router.push(link)