mirror of
https://github.com/zulip/zulip.git
synced 2025-11-07 15:33:30 +00:00
A realm filter should match only after the start of a line, whitespace or opening delimiters. But markdown was not configured to respect those rules which was causing some weird rendering behavior. This commit fixes the regex used for matching realm filters. On the backend we are using regex with negative lookbehind to perform matches but since javascript regex don't support lookbehind we are using a workaround on the frontend using `contains_backend_only_syntax()` function which detects if a realm filter can be rendered correctly by backend only and if so it stops the message from getting echoed locally. Fixes: #5154.
12 KiB
12 KiB