mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-07-07 02:57:20 +00:00
Fix loose matching for automod
Added a missing closing bracket for the regex to work.
This commit is contained in:
parent
5a4e50b19d
commit
b89f0b19dc
1 changed files with 1 additions and 1 deletions
|
@ -54,7 +54,7 @@ export const MatchWordsTrigger = automodTrigger<MatchResultType>()({
|
||||||
const looseMatchingThreshold = Math.min(Math.max(trigger.loose_matching_threshold, 1), 64);
|
const looseMatchingThreshold = Math.min(Math.max(trigger.loose_matching_threshold, 1), 64);
|
||||||
const patterns = trigger.words.map((word) => {
|
const patterns = trigger.words.map((word) => {
|
||||||
let pattern = trigger.loose_matching
|
let pattern = trigger.loose_matching
|
||||||
? [...word].map((c) => escapeStringRegexp(c)).join(`(?:\\s*|.{0,${looseMatchingThreshold})`)
|
? [...word].map((c) => escapeStringRegexp(c)).join(`(?:\\s*|.{0,${looseMatchingThreshold}})`)
|
||||||
: escapeStringRegexp(word);
|
: escapeStringRegexp(word);
|
||||||
|
|
||||||
if (trigger.only_full_words) {
|
if (trigger.only_full_words) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue