Merge branch '748-hashtag-link-fixes' into 'develop'

StatusContent: Try to get hashtag from dataset first.

Closes #748

See merge request pleroma/pleroma-fe!1128
This commit is contained in:
HJ 2020-06-04 16:06:33 +00:00
commit c678756eba
1 changed files with 2 additions and 2 deletions

View File

@ -176,8 +176,8 @@ const StatusContent = {
} }
} }
if (target.rel.match(/(?:^|\s)tag(?:$|\s)/) || target.className.match(/hashtag/)) { if (target.rel.match(/(?:^|\s)tag(?:$|\s)/) || target.className.match(/hashtag/)) {
// Extract tag name from link url // Extract tag name from dataset or link url
const tag = extractTagFromUrl(target.href) const tag = target.dataset.tag || extractTagFromUrl(target.href)
if (tag) { if (tag) {
const link = this.generateTagLink(tag) const link = this.generateTagLink(tag)
this.$router.push(link) this.$router.push(link)