Explorar o código

fix(cmd): do not process mentions in fenced codeblock

ayn2op hai 6 meses
pai
achega
cba89ee406
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      cmd/message_input.go

+ 1 - 1
cmd/message_input.go

@@ -210,7 +210,7 @@ func processText(cID discord.ChannelID, src []byte) string {
 
 	ast.Walk(discordmd.Parse(src), func(node ast.Node, enter bool) (ast.WalkStatus, error) {
 		switch node := node.(type) {
-		case *ast.CodeBlock:
+		case *ast.CodeBlock, *ast.FencedCodeBlock:
 			canMention = !enter
 		case *discordmd.Inline:
 			if (node.Attr & discordmd.AttrMonospace) != 0 {