summaryrefslogtreecommitdiff
path: root/packages/frontend/src/scripts/autocomplete.ts
diff options
context:
space:
mode:
authorKaity A <kaity@atikayda.au>2024-02-24 05:05:25 +0000
committerKaity A <kaity@atikayda.au>2024-02-24 05:05:25 +0000
commitdef2e8dff03da399e68045eec02dddc9d1781a0a (patch)
tree6246b4898fb88d045c09accaf51d6a60b554d80e /packages/frontend/src/scripts/autocomplete.ts
parentfix: delete old follow request (if exists) before creating new (diff)
parentmerge: Reactions not working on child notes in detailed view (!438) (diff)
downloadsharkey-def2e8dff03da399e68045eec02dddc9d1781a0a.tar.gz
sharkey-def2e8dff03da399e68045eec02dddc9d1781a0a.tar.bz2
sharkey-def2e8dff03da399e68045eec02dddc9d1781a0a.zip
Merge remote-tracking branch 'origin/develop' into fix/failed-follow
Diffstat (limited to 'packages/frontend/src/scripts/autocomplete.ts')
-rw-r--r--packages/frontend/src/scripts/autocomplete.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/packages/frontend/src/scripts/autocomplete.ts b/packages/frontend/src/scripts/autocomplete.ts
index 36264fc459..9fc8f7843e 100644
--- a/packages/frontend/src/scripts/autocomplete.ts
+++ b/packages/frontend/src/scripts/autocomplete.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
@@ -93,9 +93,11 @@ export class Autocomplete {
return;
}
+ const afterLastMfmParam = text.split(/\$\[[a-zA-Z]+/).pop();
+
const isMention = mentionIndex !== -1;
const isHashtag = hashtagIndex !== -1;
- const isMfmParam = mfmParamIndex !== -1 && text.split(/\$\[[a-zA-Z]+/).pop()?.includes('.');
+ const isMfmParam = mfmParamIndex !== -1 && afterLastMfmParam?.includes('.') && !afterLastMfmParam?.includes(' ');
const isMfmTag = mfmTagIndex !== -1 && !isMfmParam;
const isEmoji = emojiIndex !== -1 && text.split(/:[a-z0-9_+\-]+:/).pop()!.includes(':');