Skip to content

Commit

Permalink
Update translate.js
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtanisTheOne committed May 26, 2021
1 parent 2428199 commit 28bdfab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/translate.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ function discordPatch (string)
// eslint-disable-next-line no-useless-escape
const urlRegex = /(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)?[a-z0-9]+([-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?/giu;

let regexFix = string.replace(/:[^\s]*?:/gmi);
//let regexFix = string.replace(/:[^\s]*?:/gmi);

let match = string.match(/<.*?>/gmiu);
let everyonePing = string.match(/@everyone|@here/giu);
let urlMatch = string.match(urlRegex);

regexFix = string.replace(/<.*?>/gmiu, "<>").
var regexFix = string.replace(/<.*?>/gmiu, "<>").
replace(urlRegex, "{}").
replace(/@everyone/g, "[]").
replace(/@here/g, "[]");
Expand Down

0 comments on commit 28bdfab

Please sign in to comment.