Emojis aren't parsed when between square brackets

(#623) Bug Awaiting confirmation emoji markdown

Summary

When an emoji (here :eyes:) is between square brackets (with or without other content), it will stay as text. Result: image Raw:
:eyes:

[:eyes:]

[ :eyes: ]

[   Anything :eyes:  ]

[:eyes:[

{:eyes:}
Discord result: image Original issue (with comments) : https://feedback.fluxer.com/p/324

Steps to reproduce

  1. Send a message with an emoji between square brackets ([ ]),
  2. The emoji is not parsed and remain as text.

Environment

stable build 508 (3250c73), 2026-06-06 21:26:08 UTC, Firefox 152.0, Windows NT 10.0 (x64)
  • 555020095-a6d91ebb-f751-422d-b714-e4db8e83514c.png

    555020095-a6d91ebb-f751-422d-b714-e4db8e83514c.png

    158×148 | 7 kB

  • 561242320-95de2c80-ae85-402c-b742-46c23f6812d4.png

    561242320-95de2c80-ae85-402c-b742-46c23f6812d4.png

    130×138 | 5 kB

Merged posts

These posts were merged into this one. Their comments are now part of the conversation below, marked with where they came from.

Merged from #324 Emojis aren't parsed when between square brackets

RexSystemoriginally by @SSStuart on GitHub

Report details

Summary

When an emoji (here :eyes:) is between square brackets (with or without other content), it will stay as text. ResultRawDiscord result image `👀 [👀] [ 👀 ] [ Anything 👀 ] [👀[ {👀}` image </table

Steps to reproduce

  1. Send a message with an emoji between square brackets ([ ]),
  2. The emoji is not parsed and remain as text.

Environment (optional)

stable build 84 (356bd53), 2026-03-06 03:57:38 UTC, Firefox 148.0, Windows NT 10.0 (x64)
  • 555020095-a6d91ebb-f751-422d-b714-e4db8e83514c.png

    555020095-a6d91ebb-f751-422d-b714-e4db8e83514c.png

    158×148 | 7 kB

  • 561242320-95de2c80-ae85-402c-b742-46c23f6812d4.png

    561242320-95de2c80-ae85-402c-b742-46c23f6812d4.png

    130×138 | 5 kB

5 comments

Sign in with Fluxer to comment and vote.
Comment by Rex
RexSystem 1 vote
Status changed from Fixed to Awaiting confirmation
This was closed in a bulk cleanup before Fluxer V2 without being checked or fixed. It may work now, so it is waiting for someone to confirm whether the bug still happens.
Comment by @TheFurryGamer2016
RexSystem 1 vote Merged from #324 originally by @TheFurryGamer2016 on GitHub
seems like a processing queue issue, as it's probably trying to treat the eyes as part of a link. Why? It's part of the embeds feature. (just commenting so it's easier to fix)
Comment by @SSStuart
RexSystem 1 vote Merged from #324 originally by @SSStuart on GitHub OP
I agree with this explanation. But I think it shouldn't happen if there are no parentheses directly following the brackets.
Comment by @cproudlock
RexSystem 1 vote Merged from #324 originally 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.
Comment by @CritteRo
RexSystem 1 vote originally by @CritteRo on GitHub
This is fixed on canary already. The issue on stable seems to have been related to the markdown parser. Stable: image Canary: image
  • 609183665-b8c9f2b2-9c92-4597-bb29-2564533a9ce8.png

    609183665-b8c9f2b2-9c92-4597-bb29-2564533a9ce8.png

    1064×523 | 33 kB

  • 609183834-98c68140-5789-4ff8-899f-c465a4cbdbbf.png

    609183834-98c68140-5789-4ff8-899f-c465a4cbdbbf.png

    602×169 | 12 kB