mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-29 13:27:31 -07:00
Fix syuilo#5729 (#5732)
This commit is contained in:
parent
ab636cd5df
commit
e1b070757b
1 changed files with 2 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue