mirror of
https://github.com/opensupports/opensupports.git
synced 2025-07-28 08:14:25 +02:00
Fixes mentions-parser to ignore alphabetic characters
This commit is contained in:
parent
e1dffaef16
commit
e28e1bbeb1
@ -18,7 +18,7 @@ class MentionsParser {
|
|||||||
parsingLink = true;
|
parsingLink = true;
|
||||||
parsingType = PARSING_MENTION;
|
parsingType = PARSING_MENTION;
|
||||||
parsingSegment = '';
|
parsingSegment = '';
|
||||||
} else if(!this.isAlphanumeric(character) && parsingLink){
|
} else if(!this.isDigit(character) && parsingLink){
|
||||||
ans += this.compileSegment(parsingSegment, parsingType);
|
ans += this.compileSegment(parsingSegment, parsingType);
|
||||||
|
|
||||||
parsingLink = false;
|
parsingLink = false;
|
||||||
@ -34,8 +34,8 @@ class MentionsParser {
|
|||||||
return ans;
|
return ans;
|
||||||
}
|
}
|
||||||
|
|
||||||
isAlphanumeric(string){
|
isDigit(string){
|
||||||
return /[a-zA-Z0-9]/.test(string);
|
return /[0-9]/.test(string);
|
||||||
}
|
}
|
||||||
|
|
||||||
compileSegment(segment, parsingType){
|
compileSegment(segment, parsingType){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user