remove bracket from regex

This commit is contained in:
Alexander Cobleigh 2020-10-16 13:49:26 +02:00 committed by Henry
parent ffb207ce57
commit 2f746d99e1
1 changed files with 1 additions and 1 deletions

View File

@ -159,7 +159,7 @@ const preparePreview = async function(ctx) {
// This matches for @string followed by a space or other punctuations like ! , or .
// The idea here is to match a plain @name but not [@name](...)
// also: re.exec is stateful => regex is consumed and thus needs to be re-instantiated for each call
const rex = /(?!\[)@([a-zA-Z0-9-]+)([\s\.,!?)\]~]{1}|$)/g
const rex = /(?!\[)@([a-zA-Z0-9-]+)([\s\.,!?)~]{1}|$)/g
// ^ sentence ^
// delimiters