Skip to content

Commit

Permalink
fix: update reSticker regex to make the quantifier non-greedy
Browse files Browse the repository at this point in the history
  • Loading branch information
ppolariss committed Nov 30, 2024
1 parent 96dd3f4 commit 5db69f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/notification.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ func UpdateAdminList(ctx context.Context) {
var (
reMention = regexp.MustCompile(`#{1,2}\d+`)
reFormula = regexp.MustCompile(`(?s)\${1,2}.*?\${1,2}`)
reSticker = regexp.MustCompile(`!\[\]\(dx_\S+\)`)
reSticker = regexp.MustCompile(`!\[\]\(dx_\S+?\)`)
reImage = regexp.MustCompile(`!\[.*?\]\(.*?\)`)
)

Expand Down

0 comments on commit 5db69f7

Please sign in to comment.