mirror of
https://github.com/al0cam/AutoMover.git
synced 2026-07-22 12:10:26 +00:00
bugfix: fix for regex groups in tags
This commit is contained in:
parent
fa556ce751
commit
f875abfec8
2 changed files with 5 additions and 3 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
2
main.ts
2
main.ts
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue