Watched words links corrupt @mentions and #categories

I’ve just converted from @sam’s great Linkify words in post theme component to the fairly new core Watched Words.

Unfortunately, this has broken any @mentions, #categories, and #tags that happen to contain a Watched Word in the posts on our forum. There are quite a lot of these.

The Theme Component had pretty good logic for this - could this aspect also be incorporated into the core functionality?


I see, yes something is not feeling right here, @nbianca can probably have a look in a week or so.

We have DiscourseConnect →

I guess the gap here is that @ and # should be treated as part of the word and #DiscourseConnect should not be auto linked?


If reasonably possible, the safest behaviour would seem to me to be only applying a watched words match if an @mentions, #categories or #tags match has not already been made.

That would allow mention/category/tag links to be used where watched words happen to overlap while also still allowing watched words to catch something in e.g. #NotACategoryOrTag

1 Like

Words preceded by # or @ will no longer be replaced by other words or links since this PR was merged: