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

This commit is contained in:
ayn2op 2025-10-19 19:13:47 -04:00
parent 6b0174c8dc
commit cba89ee406

View file

@ -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 {