Skip to content

fix(ignores): Remove partially overlapped emotes - #7224

Merged
pajlada merged 1 commit into
Chatterino:masterfrom
Nerixyz:feat/gifs-2.5-of-n
Sep 4, 2026
Merged

pajlada merged 1 commit into
Chatterino:masterfrom
Nerixyz:feat/gifs-2.5-of-n

Conversation

@Nerixyz

@Nerixyz Nerixyz commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

When an ignore-replace phrase starts in an emote, we didn't remove the special item. It's best illustrated by the tests. If we replace pp → p in Kappa, we didn't remove the emote even though it's no longer there. The same is (eventually) true for GIFs (#7223 (comment)).

This PR fixes that by removing all specials that overlap the removed range.

This is part of a stack

  1. refactor: Generalize Twitch emote parsing #7219
  2. fix: store length for Twitch specials #7220
    2.5. fix(ignores): Remove partially overlapped emotes #7224 ← this one (not required for 3)

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

Comment thread src/messages/MessageBuilder.cpp
@Nerixyz
Nerixyz marked this pull request as ready for review September 4, 2026 13:29
@pajlada
pajlada merged commit bee30e6 into Chatterino:master Sep 4, 2026
18 checks passed
babicekmarek pushed a commit to babicekmarek/streamally-chatterino that referenced this pull request Sep 14, 2026
When an ignore-replace phrase starts in an emote, we didn't remove the
special item. It's best illustrated by the tests. If we replace `pp` →
`p` in `Kappa`, we didn't remove the emote even though it's no longer
there. The same is (eventually) true for GIFs
(Chatterino#7223 (comment)).

This PR fixes that by removing all specials that overlap the removed
range.

Reviewed-by: pajlada <rasmus.karlsson@pajlada.com>
Reviewed-by: Mm2PL <mm2pl+gh@kotmisia.pl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants