RexSystem1 voteoriginally by @cproudlock on GitHub
The rendering side is fine — code blocks display mentions as plain text. The issue is that notifications are still triggered for mentions inside code blocks.
The mention parsing in packages/markdown_parser/src/parsers/InlineParsers.tsx (around lines 270-339) processes mentions unconditionally without checking whether they're inside a code block context. The block parser (BlockParsers.tsx) handles code blocks at a higher level, but the notification extraction layer doesn't consult the AST to check whether a mention node is a child of a CodeBlock node.
The fix should be applied wherever mentions are extracted for notification purposes (not in the renderer, which already handles this correctly). Before triggering a notification for a mention, the code should walk up the AST to verify the mention isn't inside a CodeBlock or InlineCode node.
Thread
Comment by @cproudlock
packages/markdown_parser/src/parsers/InlineParsers.tsx(around lines 270-339) processes mentions unconditionally without checking whether they're inside a code block context. The block parser (BlockParsers.tsx) handles code blocks at a higher level, but the notification extraction layer doesn't consult the AST to check whether a mention node is a child of a CodeBlock node. The fix should be applied wherever mentions are extracted for notification purposes (not in the renderer, which already handles this correctly). Before triggering a notification for a mention, the code should walk up the AST to verify the mention isn't inside a CodeBlock or InlineCode node.