bugfix: fix for regex groups in tags

This commit is contained in:
Al0cam 2025-11-10 09:37:30 +01:00
parent fa556ce751
commit f875abfec8
2 changed files with 5 additions and 3 deletions

View file

@ -109,9 +109,11 @@ class RuleMatcherUtil {
console.log("Compiled regex: ", regex);
for (const tag of tags) {
const matches = tag.tag.match(regex);
if (matches) {
return matches;
}
}
return matches;
return null;
}
/**

View file

@ -145,7 +145,7 @@ export default class AutoMoverPlugin extends obsidian.Plugin {
if (tagRule == null || tagRule.folder == null) return false;
if (ruleMatcherUtil.isRegexGrouped(tagRule)) {
const matches = ruleMatcherUtil.getGroupMatches(file, tagRule);
const matches = ruleMatcherUtil.getGroupMatchesForTags(tags, tagRule);
console.log("File: ", file.path);
console.log("Tag rule: ", tagRule);
console.log("Tag matches: ", matches);