feat: sound autocomplete matches anywhere in name using includes()
This commit is contained in:
parent
2a00fcdf5d
commit
41d6f1b5da
1 changed files with 1 additions and 1 deletions
|
|
@ -155,7 +155,7 @@ function soundHandler(context) {
|
|||
const fragment = fragMatch ? fragMatch[1] : inside;
|
||||
if (!fragment || fragment.length === 0) return null;
|
||||
const soundNames = Object.keys(soundMap.get()).sort();
|
||||
const filteredSounds = soundNames.filter((name) => name.startsWith(fragment));
|
||||
const filteredSounds = soundNames.filter((name) => name.includes(fragment));
|
||||
let options = filteredSounds.map((name) => ({ label: name, type: 'sound' }));
|
||||
const from = soundContext.to - fragment.length;
|
||||
return {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue