mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-29 04:38:55 +03:00
Fix bug: hashtags opening account sheet
This commit is contained in:
parent
17a289ac22
commit
b472e496d1
1 changed files with 5 additions and 1 deletions
|
@ -8,7 +8,11 @@ function handleContentLinks(opts) {
|
|||
if (!target) return;
|
||||
const prevText = target.previousSibling?.textContent;
|
||||
const textBeforeLinkIsAt = prevText?.endsWith('@');
|
||||
if (target.classList.contains('u-url') || textBeforeLinkIsAt) {
|
||||
const textStartsWithAt = target.innerText.startsWith('@');
|
||||
if (
|
||||
(target.classList.contains('u-url') && textStartsWithAt) ||
|
||||
(textBeforeLinkIsAt && !textStartsWithAt)
|
||||
) {
|
||||
const targetText = (
|
||||
target.querySelector('span') || target
|
||||
).innerText.trim();
|
||||
|
|
Loading…
Reference in a new issue