dkforest

A forum and chat platform (onion)
git clone https://git.dasho.dev/n0tr1v/dkforest.git
Log | Files | Refs | LICENSE

commit 06060831e75d7930052cb810b8b772048fac5668
parent 5c403e60ebeeae2c60bc9fc7c018b9f5f9c9a766
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Wed, 16 Nov 2022 14:48:00 -0500

improve autocomplete

Diffstat:
Mpkg/web/handlers/api/v1/snippetInterceptor.go | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/pkg/web/handlers/api/v1/snippetInterceptor.go b/pkg/web/handlers/api/v1/snippetInterceptor.go @@ -47,8 +47,10 @@ func autocompleteTags(html string) string { html = autoTagRgx.ReplaceAllStringFunc(html, func(s string) string { s1 := strings.TrimPrefix(s, "@") s1 = strings.TrimSuffix(s1, "*") + s1 = strings.ToLower(s1) for _, au := range activeUsers { - if strings.HasPrefix(au.Username, s1) { + l := strings.ToLower(au.Username) + if strings.HasPrefix(l, s1) { return "@" + au.Username } }