From 5e99bad4177bc60c1f07bdbe019231706a9f0879 Mon Sep 17 00:00:00 2001
From: taehoon
Date: Thu, 8 Aug 2019 14:31:32 -0400
Subject: [PATCH 1/3] detect hashtag using rel instead of class
---
src/components/status/status.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/components/status/status.js b/src/components/status/status.js
index 3c172e5b..88ef9e40 100644
--- a/src/components/status/status.js
+++ b/src/components/status/status.js
@@ -335,7 +335,7 @@ const Status = {
return
}
}
- if (target.className.match(/hashtag/)) {
+ if (target.rel === 'tag') {
// Extract tag name from link url
const tag = extractTagFromUrl(target.href)
if (tag) {
From 5aa2c44487606f137a9bc524b6bf9b1349d058b9 Mon Sep 17 00:00:00 2001
From: taehoon
Date: Mon, 12 Aug 2019 15:22:39 -0400
Subject: [PATCH 2/3] use hashtag class detection as fallback
---
src/components/status/status.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/components/status/status.js b/src/components/status/status.js
index 88ef9e40..5204fa73 100644
--- a/src/components/status/status.js
+++ b/src/components/status/status.js
@@ -335,7 +335,7 @@ const Status = {
return
}
}
- if (target.rel === 'tag') {
+ if (target.rel === 'tag' || target.className.match(/hashtag/)) {
// Extract tag name from link url
const tag = extractTagFromUrl(target.href)
if (tag) {
From 9229f28edbdcf33be3e053647f202a31f84c58ec Mon Sep 17 00:00:00 2001
From: taehoon
Date: Tue, 13 Aug 2019 13:11:37 -0400
Subject: [PATCH 3/3] rel also accepts list, update rel detection logic
---
src/components/status/status.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/components/status/status.js b/src/components/status/status.js
index 5204fa73..502d9583 100644
--- a/src/components/status/status.js
+++ b/src/components/status/status.js
@@ -335,7 +335,7 @@ const Status = {
return
}
}
- if (target.rel === 'tag' || target.className.match(/hashtag/)) {
+ if (target.rel.match(/(?:^|\s)tag(?:$|\s)/) || target.className.match(/hashtag/)) {
// Extract tag name from link url
const tag = extractTagFromUrl(target.href)
if (tag) {