From 89eef10d4408462e455dba208b830f5d412a0e15 Mon Sep 17 00:00:00 2001 From: Luke Faraone Date: Thu, 13 Feb 2014 15:12:19 -0500 Subject: [PATCH] Match alert words inside markup. We now will match an alert word even if it is used at the boundry of bolding, backtick escaping, or caret quoting. Closes trac #2186. (imported from commit 984bc63eb621772c95a01ca5c5bfeb190767f71f) --- zerver/lib/bugdown/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zerver/lib/bugdown/__init__.py b/zerver/lib/bugdown/__init__.py index e97875883f..d6aa21fc21 100644 --- a/zerver/lib/bugdown/__init__.py +++ b/zerver/lib/bugdown/__init__.py @@ -770,8 +770,8 @@ class AlertWordsNotificationProcessor(markdown.preprocessors.Preprocessor): realm_words = db_data['realm_alert_words'] content = '\n'.join(lines).lower() - allowed_before_punctuation = "|".join([r'\s', '^', r'[\(\".,\';\[]']) - allowed_after_punctuation = "|".join([r'\s', '$', r'[\)\"\?:.,\';\]!]']) + allowed_before_punctuation = "|".join([r'\s', '^', r'[\(\".,\';\[\*`>]']) + allowed_after_punctuation = "|".join([r'\s', '$', r'[\)\"\?:.,\';\]!\*`]']) for user_id, words in realm_words.iteritems(): for word in words: