RexSystem1 voteMerged from #324originally by @cproudlock on GitHub
As the earlier commenter suspected, this is a parser precedence issue.
In packages/markdown_parser/src/parsers/InlineParsers.tsx, the special sequence handling (link/bracket parsing via LinkParsers.tsx) runs before emoji shortcode parsing. When the parser sees [, it attempts to extract a link in [text](url) format.
In LinkParsers.tsx (lines 41-53), containsLinkSyntax() finds the opening [ and closing ] brackets. Even though there's no (url) following, the bracket detection consumes the content between brackets. By the time emoji shortcode parsing gets a chance to run, the :eyes: inside the brackets has already been treated as plain text.
The fix would be: when bracket content doesn't resolve to a valid link (no ](url) following), re-parse the bracket interior for inline elements including emoji shortcodes, rather than treating it as plain text.
Thread
Comment by @cproudlock
packages/markdown_parser/src/parsers/InlineParsers.tsx, the special sequence handling (link/bracket parsing viaLinkParsers.tsx) runs before emoji shortcode parsing. When the parser sees[, it attempts to extract a link in[text](url)format. InLinkParsers.tsx(lines 41-53),containsLinkSyntax()finds the opening[and closing]brackets. Even though there's no(url)following, the bracket detection consumes the content between brackets. By the time emoji shortcode parsing gets a chance to run, the:eyes:inside the brackets has already been treated as plain text. The fix would be: when bracket content doesn't resolve to a valid link (no](url)following), re-parse the bracket interior for inline elements including emoji shortcodes, rather than treating it as plain text.