summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMeiMei <30769358+mei23@users.noreply.github.com>2020-01-20 01:53:17 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2020-01-20 01:53:17 +0900
commit5a950cf991d7c4e5142dbf0a3228acce81c17475 (patch)
tree1c695ded79535656e965c4f863e0c756bae28fd5
parentFix #5728 (#5731) (diff)
downloadsharkey-5a950cf991d7c4e5142dbf0a3228acce81c17475.tar.gz
sharkey-5a950cf991d7c4e5142dbf0a3228acce81c17475.tar.bz2
sharkey-5a950cf991d7c4e5142dbf0a3228acce81c17475.zip
Fix syuilo#5729 (#5732)
-rw-r--r--src/mfm/fromHtml.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mfm/fromHtml.ts b/src/mfm/fromHtml.ts
index 60293b07f7..0ffae014ae 100644
--- a/src/mfm/fromHtml.ts
+++ b/src/mfm/fromHtml.ts
@@ -36,7 +36,8 @@ export function fromHtml(html: string): string {
const txt = getText(node);
const rel = node.attrs.find((x: any) => x.name == 'rel');
const href = node.attrs.find((x: any) => x.name == 'href');
- const isHashtag = rel && rel.value.match('tag') !== null;
+ const _class = node.attrs.find((x: any) => x.name == 'class');
+ const isHashtag = rel?.value?.match('tag') || _class?.value?.match('hashtag');
// ハッシュタグ / hrefがない / txtがURL
if (isHashtag || !href || href.value == txt) {