From e28e1bbeb18b32bb9a46a1c7143e33458bdacc17 Mon Sep 17 00:00:00 2001 From: Maxi Redigonda Date: Tue, 20 Nov 2018 20:10:35 -0300 Subject: [PATCH] Fixes mentions-parser to ignore alphabetic characters --- client/src/lib-app/mentions-parser.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/lib-app/mentions-parser.js b/client/src/lib-app/mentions-parser.js index 81579c57..52828b51 100644 --- a/client/src/lib-app/mentions-parser.js +++ b/client/src/lib-app/mentions-parser.js @@ -18,7 +18,7 @@ class MentionsParser { parsingLink = true; parsingType = PARSING_MENTION; parsingSegment = ''; - } else if(!this.isAlphanumeric(character) && parsingLink){ + } else if(!this.isDigit(character) && parsingLink){ ans += this.compileSegment(parsingSegment, parsingType); parsingLink = false; @@ -34,8 +34,8 @@ class MentionsParser { return ans; } - isAlphanumeric(string){ - return /[a-zA-Z0-9]/.test(string); + isDigit(string){ + return /[0-9]/.test(string); } compileSegment(segment, parsingType){