RTE bug fixes: custom emoji and references with dots

What does this MR do and why?

Fix more bugs in RTE

  • Fixes the regex to consider optional punctuation before a space. This means that references like %18.3 and @user.with.dots will not break.
  • Add an early return to suggestions expansion logic to ensure custom emojis are not broken.

Changelog: fixed

References

Screenshots or screen recordings

Before After
CleanShot 2025-08-20 at 12.28.59.mp4 CleanShot 2025-08-20 at 12.27.06.mp4
CleanShot 2025-08-20 at 12.31.16.mp4 CleanShot 2025-08-20 at 12.33.31.mp4

How to set up and validate locally

  1. In RTE, type in %1. : it should not resolve to a reference. It is resolved only after you add a space after the dot.
  2. Try inserting a custom emoji in RTE, it should work fine now. This was previously broken.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Himanshu Kapoor

Merge request reports

Loading