Unverified Commit c177db69 authored by boojack's avatar boojack Committed by GitHub

chore: update tag regexp (#785)

parent b704c208
......@@ -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 {
......
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);
......
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