diff --git a/javascript/ext_wildcards.js b/javascript/ext_wildcards.js index 22a2944..b4eae15 100644 --- a/javascript/ext_wildcards.js +++ b/javascript/ext_wildcards.js @@ -1,5 +1,5 @@ // Regex -const WC_REGEX = /\b__([^, ]+)__([^, ]*)\b/g; +const WC_REGEX = /\b__([^,]+)__([^, ]*)\b/g; // Trigger conditions const WC_TRIGGER = () => CFG.useWildcards && [...tagword.matchAll(WC_REGEX)].length > 0; diff --git a/javascript/tagAutocomplete.js b/javascript/tagAutocomplete.js index d6b54dc..4f32f12 100644 --- a/javascript/tagAutocomplete.js +++ b/javascript/tagAutocomplete.js @@ -287,8 +287,9 @@ function isEnabled() { const WEIGHT_REGEX = /[([]([^,()[\]:| ]+)(?::(?:\d+(?:\.\d+)?|\.\d+))?[)\]]/g; const POINTY_REGEX = /<[^\s,<](?:[^\t\n\r,<>]*>|[^\t\n\r,> ]*)/g; +const COMPLETED_WILDCARD_REGEX = /__[^\s,_][^\t\n\r,_]*[^\s,_]__[^\s,_]*/g; const NORMAL_TAG_REGEX = /[^\s,|<>]+|