Skip to content

armgit / memos

Public Imported from GitHub
0

Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.

fix: tag regexp (#173)

boojackcdbd934c4e42
diff --git a/server/tag.go b/server/tag.go
index f6226da3c..19c123daf 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)
}