Skip to content

Conversation

@oI0ck
Copy link

@oI0ck oI0ck commented Aug 5, 2025

This PR fixes faulty logic generating bad regexes on message edits in a following case:

In a user sent out a message before finishing it, with an unfinished last word, like here:
how many wood would a woodchuck c
and then edited it to
how many wood would a woodchuck chuck if a woodchuck would chuck wood,
the bridge would output s/c/chuck if a woodchuck would chuck wood/, which,
if evaluated, produces how many wood would a woodchuck if a woodchuck would chuck woodhuck chuck.

The bridge did not take the possibility of the replaced part occurring more than one time into the account.

These changes fix it by introducing the regex dollar operator for matching line endings in this very specific case.

@oI0ck oI0ck requested a review from a team as a code owner August 5, 2025 11:20
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.

1 participant