Commit 64332c3e authored by Steven's avatar Steven

chore: update tag regexp

parent 57f51d1c
...@@ -47,7 +47,7 @@ func (s *Server) registerTagRoutes(g *echo.Group) { ...@@ -47,7 +47,7 @@ func (s *Server) registerTagRoutes(g *echo.Group) {
tagMapSet := make(map[string]bool) tagMapSet := make(map[string]bool)
r := regexp.MustCompile(`#([^\s]+?) `) r := regexp.MustCompile(`#([^\s#]+?) `)
if err != nil { if err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, "Failed to compile regexp").SetInternal(err) return echo.NewHTTPError(http.StatusInternalServerError, "Failed to compile regexp").SetInternal(err)
} }
......
...@@ -11,7 +11,7 @@ export const TOAST_ANIMATION_DURATION = 400; ...@@ -11,7 +11,7 @@ export const TOAST_ANIMATION_DURATION = 400;
export const DAILY_TIMESTAMP = 3600 * 24 * 1000; export const DAILY_TIMESTAMP = 3600 * 24 * 1000;
// tag regex // tag regex
export const TAG_REG = /#(\S+?) /g; export const TAG_REG = /#([^\s#]+?) /g;
// markdown image regex // markdown image regex
export const IMAGE_URL_REG = /!\[.*?\]\((.+?)\)/g; export const IMAGE_URL_REG = /!\[.*?\]\((.+?)\)/g;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment