From a56f5a9b659f2c1316b2dea9c2c77f3f221d78e4 Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Fri, 3 Oct 2014 13:20:40 +0200 Subject: [PATCH] FIX: fix @mentions for usernames shorter than 2 characters Super short usernames were enabled by https://github.com/discourse/discourse/pull/2838 This is just a fix for @mentions --- app/assets/javascripts/discourse/dialects/mention_dialect.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/dialects/mention_dialect.js b/app/assets/javascripts/discourse/dialects/mention_dialect.js index 26b5352d394..45962163506 100644 --- a/app/assets/javascripts/discourse/dialects/mention_dialect.js +++ b/app/assets/javascripts/discourse/dialects/mention_dialect.js @@ -7,7 +7,7 @@ Discourse.Dialect.inlineRegexp({ start: '@', // NOTE: we really should be using SiteSettings here, but it loads later in process // also, if we do, we must ensure serverside version works as well - matcher: /^(@[A-Za-z0-9][A-Za-z0-9_]{1,40})/m, + matcher: /^(@[A-Za-z0-9][A-Za-z0-9_]{0,40})/m, wordBoundary: true, emitter: function(matches) {