Adjust channel mention regex (#269)

This commit is contained in:
Thomas Zarebczan 2021-11-10 14:53:42 -05:00 committed by GitHub
parent 5c23c6d88e
commit d649e3563f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,7 +9,7 @@ const mentionToken = '@';
// const mentionTokenCode = 64; // @ // const mentionTokenCode = 64; // @
const invalidRegex = /[-_.+=?!@#$%^&*:;,{}<>\w/\\]/; const invalidRegex = /[-_.+=?!@#$%^&*:;,{}<>\w/\\]/;
const mentionRegex = /@[^\s()"_.+=?!@$%^&*;,{}<>/\\]*/gm; const mentionRegex = /@[^\s"=?!@$%^&*;,{}<>/\\]*/gm;
function handlePunctuation(value) { function handlePunctuation(value) {
const protocolIndex = value.indexOf('lbry://') === 0 ? protocol.length - 1 : 0; const protocolIndex = value.indexOf('lbry://') === 0 ? protocol.length - 1 : 0;