From 5fadbd5201587f733b060881cb471ce196fdd11f Mon Sep 17 00:00:00 2001 From: Zachatoo Date: Mon, 21 Oct 2024 21:08:01 -0600 Subject: [PATCH] feat: Ignore casing for autocompletions --- src/editor/Autocomplete.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/editor/Autocomplete.ts b/src/editor/Autocomplete.ts index 80d3f1a..d376863 100644 --- a/src/editor/Autocomplete.ts +++ b/src/editor/Autocomplete.ts @@ -85,7 +85,9 @@ export class Autocomplete extends EditorSuggest { if (!suggestions) { return []; } - return suggestions.filter((s) => s.queryKey.startsWith(context.query)); + return suggestions.filter((s) => + s.queryKey.toLowerCase().startsWith(context.query.toLowerCase()) + ); } renderSuggestion(value: TpSuggestDocumentation, el: HTMLElement): void {