chore: update tag regexp (#785)

pull/796/head
boojack 2 years ago committed by GitHub
parent b704c20809
commit c177db69d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -12,7 +12,7 @@ import (
"github.com/labstack/echo/v4"
)
var tagRegexpList = []*regexp.Regexp{regexp.MustCompile(`^#([^\s#]+?) `), regexp.MustCompile(`[^\S]#([^\s#]+?) `), regexp.MustCompile(` #([^\s#]+?) `)}
var tagRegexpList = []*regexp.Regexp{regexp.MustCompile(`^#([^\s#]+?) `), regexp.MustCompile(`^#([^\s#]+?)\s`), regexp.MustCompile(`[^\S]#([^\s#]+?)$`), regexp.MustCompile(`[^\S]#([^\s#]+?) `), regexp.MustCompile(` #([^\s#]+?) `)}
func (s *Server) registerTagRoutes(g *echo.Group) {
g.GET("/tag", func(c echo.Context) error {

@ -1,6 +1,6 @@
import { escape } from "lodash-es";
export const TAG_REG = /#([^\s#]+?) /;
export const TAG_REG = /#([^\s#]+)/;
const renderer = (rawStr: string): string => {
const matchResult = rawStr.match(TAG_REG);

Loading…
Cancel
Save