Skip to content
Snippets Groups Projects
Unverified Commit 034f4720 authored by 1Step621's avatar 1Step621 Committed by GitHub
Browse files

Fix(frontend): オートコンプリートが出るべき状況で出ないことがあるのを修正 (#13376)

* オートコンプリートが出るべき状況で出ないことがあるのを修正

* update CHANGELOG.md
parent 1b1046bc
No related branches found
No related tags found
3 merge requests!449release 2024.3.1,!448Release 2023.3.1 - Codename #NotDeadYet,!428Merge upstream from 19th Feburary
......@@ -30,6 +30,11 @@
### Server
- Fix: nodeinfoにenableMcaptchaとenableTurnstileが無いのを修正
## 202x.x.x (unreleased)
### Client
- Fix: MFMのオートコンプリートが出るべき状況で出ないことがある問題を修正
## 2024.2.0
### Note
......
......@@ -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(':');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment