mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 04:25:01 +00:00
Fix loose matching for automod (#428)
Added a missing closing bracket for the regex to work. Co-authored-by: Almeida <github@almeidx.dev>
This commit is contained in:
parent
e7eacb330b
commit
1cb8431a02
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