Browse Source

fix: REGEX always ticks "global "expression flag (#896)

Ahmad Kholid 2 years ago
parent
commit
cfabf1f65a
2 changed files with 2 additions and 2 deletions
  1. 1 1
      src/components/newtab/workflow/edit/EditGetText.vue
  2. 1 1
      src/utils/shared.js

+ 1 - 1
src/components/newtab/workflow/edit/EditGetText.vue

@@ -11,7 +11,7 @@
       />
       <ui-popover>
         <template #trigger>
-          <button>/{{ regexExp.join('') }}</button>
+          <button>/{{ regexExp.join('') || 'flags' }}</button>
         </template>
         <p class="mb-2 text-gray-600 dark:text-gray-200">Expression flags</p>
         <div class="space-y-1">

+ 1 - 1
src/utils/shared.js

@@ -345,7 +345,7 @@ export const tasks = {
       regex: '',
       prefixText: '',
       suffixText: '',
-      regexExp: ['g'],
+      regexExp: [],
       dataColumn: '',
       saveData: true,
       includeTags: false,