Watched words regex: word boundary not working as expected


(Kris) #1

I’ve set up a rule \bass\b and I’m getting inconsistent results:

Shouldn’t just the word “ass” be censored here?


(Jeff Atwood) #2

Are we 100% sure the watched words regular expression site setting was flipped to true?

If that is at its default (false) then watched words wouldn’t be regular expressions at all, but also it wouldn’t be matching as it is in your screenshot … so I’m not sure. @neil?

I also can’t repro this on my instance of discourse @awesomerobot :

  • turn on watched words regular expression
  • enter \bass\b in censored section
  • I see correct word boundary only censoring

(Kris) #3

Just repro’d it on Try. For some reason the word boundary isn’t working when ass and assassin are on the same line. The boundary seems to work fine if I put assassin on a new line.


(Jeff Atwood) #4

Ok there is your repro @neil and @eviltrout I would classify this as a bug for the customer you are working on, too.


(Neil Lalonde) #6

This case should be fixed now:


(Jeff Atwood) #7