[Glitch] Fix useless regular-expression character escape detected by CodeQL

lolsob-rspec
Claire 2023-02-03 21:14:22 +01:00
parent 84e332a9a1
commit 3afef18f59
1 changed files with 1 additions and 1 deletions

View File

@ -1,6 +1,6 @@
export function recoverHashtags (recognizedTags, text) {
return recognizedTags.map(tag => {
const re = new RegExp(`(?:^|[^\/\)\w])#(${tag.name})`, 'i');
const re = new RegExp(`(?:^|[^\/)\w])#(${tag.name})`, 'i');
const matched_hashtag = text.match(re);
return matched_hashtag ? matched_hashtag[1] : null;
},