Skip to content

Commit

Permalink
5.2.1 - faster regex
Browse files Browse the repository at this point in the history
  • Loading branch information
Nico105 committed Jun 5, 2022
1 parent b2b5d69 commit 4449fba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "discord-giveaways",
"version": "5.2.0",
"version": "5.2.1",
"description": "A complete framework to facilitate the creation of giveaways using discord.js",
"main": "index.js",
"types": "typings/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/Giveaway.js
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ class Giveaway extends EventEmitter {
*/
fillInString(string) {
if (typeof string !== 'string') return null;
[...new Set(string.match(/\{[^{}]*(?:[^{}]*)*\}/g))]
[...new Set(string.match(/\{[^{}]{1,}\}/g))]
.filter((match) => match?.slice(1, -1).trim() !== '')
.forEach((match) => {
let replacer;
Expand Down

0 comments on commit 4449fba

Please sign in to comment.