From cdbd934c4e4287fcc984a3d12c080e7bdc2e2e02 Mon Sep 17 00:00:00 2001 From: boojack Date: Thu, 25 Aug 2022 19:24:21 +0800 Subject: [PATCH] fix: tag regexp (#173) --- server/tag.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/tag.go b/server/tag.go index f6226da3..19c123da 100644 --- a/server/tag.go +++ b/server/tag.go @@ -47,7 +47,7 @@ func (s *Server) registerTagRoutes(g *echo.Group) { tagMapSet := make(map[string]bool) - r := regexp.MustCompile("#(.+?) ") + r := regexp.MustCompile(`#([^\s]+?) `) if err != nil { return echo.NewHTTPError(http.StatusInternalServerError, "Failed to compile regexp").SetInternal(err) }