discord: let . match \n (#147)

This commit is contained in:
ayntgl 2022-03-17 21:52:21 +04:00 • committed by GitHub
parent 5cd28f6347
commit b4a22f8570
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,10 +3,10 @@ package discord
import "regexp"
var (
boldRegex = regexp.MustCompile(`(?m)\*\*(.*?)\*\*`)
italicRegex = regexp.MustCompile(`(?m)\*(.*?)\*`)
underlineRegex = regexp.MustCompile(`(?m)__(.*?)__`)
strikeThroughRegex = regexp.MustCompile(`(?m)~~(.*?)~~`)
boldRegex = regexp.MustCompile(`(?ms)\*\*(.*?)\*\*`)
italicRegex = regexp.MustCompile(`(?ms)\*(.*?)\*`)
underlineRegex = regexp.MustCompile(`(?ms)__(.*?)__`)
strikeThroughRegex = regexp.MustCompile(`(?ms)~~(.*?)~~`)
)
func ParseMarkdown(md string) string {