1. Fabrice Gabolde
  2. Krakenbot
  3. Issues
Issue #1 resolved

Using the substitution operator with empty strings

created an issue

When using the substitution operator with empty strings on both sides, I still get highlighted by the bot.

For example :

<me> toto

<me> s///

<krakenbot> me meant "toto"

The answer is correct as my input string is not altered, but IMHO the bot should not answer if the substitution does nothing on the input string. The main reason behind this is that I find it misleading that the bot answers if it does nothing.

Comments (5)

  1. Fabrice Gabolde repo owner

    Right, the s/// hook doesn't check if the new message is different from the old one.

    I think the bot should reply with a helpful message ("your regex failed to replace anything") if there is no difference between the old and new messages, is that fine with you?

  2. Log in to comment