Explorar o código

fix: error when using regex on get text block

Ahmad Kholid %!s(int64=3) %!d(string=hai) anos
pai
achega
c87efc54ce
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/content/blocks-handler/handler-get-text.js

+ 1 - 1
src/content/blocks-handler/handler-get-text.js

@@ -14,7 +14,7 @@ function getText(block) {
     } = block.data;
 
     if (regexData) {
-      regex = new RegExp(regexData, regexExp.join(''));
+      regex = new RegExp(regexData, [...new Set(regexExp)].join(''));
     }
 
     handleSelector(block, {