Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

replies: match case-insensitive/multiline

  • Loading branch information...
commit 4f77d82d05b931f0f01a2e30878898637e79db39 1 parent 79b6397
@pstadler pstadler authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 replies/candy.js
View
8 replies/candy.js
@@ -19,11 +19,11 @@ CandyShop.Replies = (function(self, Candy, $) {
};
var handleOnShow = function(args) {
- var localNick = Candy.Core.getUser().getNick().toLowerCase();
+ var localNick = Candy.Core.getUser().getNick();
- var re = new RegExp("@" + localNick + "([ .!><\":\/@-]|$)");
+ var re = new RegExp("@" + localNick + "([ .!><\":\/@-]|$)", 'im');
- if(re.test(args.message.toLowerCase())) {
+ if(re.test(args.message)) {
var el = args.element;
el.addClass("mention");
@@ -32,4 +32,4 @@ CandyShop.Replies = (function(self, Candy, $) {
}
return self;
-}(CandyShop.Replies || {}, Candy, jQuery));
+}(CandyShop.Replies || {}, Candy, jQuery));
Please sign in to comment.
Something went wrong with that request. Please try again.