Skip to content
Snippets Groups Projects
Commit 6328b574 authored by Ophestra's avatar Ophestra
Browse files

escape "-" and "="

parent 0d47cbc1
Branches
No related tags found
No related merge requests found
...@@ -145,6 +145,8 @@ func discordHandleCreate(session *discordgo.Session, create *discordgo.MessageCr ...@@ -145,6 +145,8 @@ func discordHandleCreate(session *discordgo.Session, create *discordgo.MessageCr
msg.ParseMode = "MarkdownV2" msg.ParseMode = "MarkdownV2"
msg.Text = strings.ReplaceAll(msg.Text, ">", "\\>") msg.Text = strings.ReplaceAll(msg.Text, ">", "\\>")
msg.Text = strings.ReplaceAll(msg.Text, "_", "\\_") msg.Text = strings.ReplaceAll(msg.Text, "_", "\\_")
msg.Text = strings.ReplaceAll(msg.Text, "-", "\\-")
msg.Text = strings.ReplaceAll(msg.Text, "=", "\\=")
msg.Text = strings.ReplaceAll(msg.Text, "*", "\\*") msg.Text = strings.ReplaceAll(msg.Text, "*", "\\*")
msg.Text = strings.ReplaceAll(msg.Text, "[", "\\[") msg.Text = strings.ReplaceAll(msg.Text, "[", "\\[")
msg.Text = strings.ReplaceAll(msg.Text, "`", "\\`") msg.Text = strings.ReplaceAll(msg.Text, "`", "\\`")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment