dkforest

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

commit 92871d2b76da4741e681158be7c69f1bd5a37465
parent 02627639fdff444abbf1b9072359b14eae39c6fb
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Thu, 19 Jan 2023 02:29:02 -0800

typo

Diffstat:
Mpkg/web/handlers/api/v1/topBarHandler.go | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkg/web/handlers/api/v1/topBarHandler.go b/pkg/web/handlers/api/v1/topBarHandler.go @@ -781,7 +781,7 @@ var profileRgxStr = `/u/\w{3,20}` var linkOrProfileRgx = regexp.MustCompile(`(` + linkRgxStr + `|` + profileRgxStr + `)`) var userProfileLinkRgx = regexp.MustCompile(`^` + profileRgxStr + `$`) var youtubeComIDRgx = regexp.MustCompile(`watch\?v=([\w-]+)`) -var youtubeComShosrtsIDRgx = regexp.MustCompile(`/shorts/([\w-]+)`) +var youtubeComShortsIDRgx = regexp.MustCompile(`/shorts/([\w-]+)`) var youtuBeIDRgx = regexp.MustCompile(`https://youtu\.be/([\w-]+)`) var yewtubeBeIDRgx = youtubeComIDRgx var invidiousIDRgx = youtubeComIDRgx @@ -955,7 +955,7 @@ func convertLinks(in string) string { m = yewtubeBeIDRgx.FindStringSubmatch(link) isYewtube = true } else if strings.HasPrefix(link, "https://www.youtube.com/shorts/") { - m = youtubeComShosrtsIDRgx.FindStringSubmatch(link) + m = youtubeComShortsIDRgx.FindStringSubmatch(link) isShortUrl = true } if len(m) == 2 {