Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 81b624b

Browse files
author
dlyt
committed
解决评论回复内容有多余字符
1 parent a919f9f commit 81b624b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/logic/comment.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ func (CommentLogic) decodeCmtContentForShow(ctx context.Context, comment *model.
335335
content := template.HTMLEscapeString(comment.Content)
336336

337337
// 回复某一楼层
338-
reg := regexp.MustCompile(`#(\d+)楼 @([a-zA-Z0-9_]+)`)
338+
reg := regexp.MustCompile(`#(\d+)楼 @([a-zA-Z0-9_-]+)`)
339339
matches := reg.FindStringSubmatch(content)
340340
if len(matches) > 2 {
341341
comment.ReplyFloor = goutils.MustInt(matches[1])

0 commit comments

Comments
 (0)