Skip to content

Commit

Permalink
apply filter to tag query
Browse files Browse the repository at this point in the history
  • Loading branch information
kctekn committed Dec 6, 2024
1 parent 283e364 commit 140a67c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/util/CodeBlockProcessor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export class codeBlockProcessor {

//const tag = source.replace(/frontmatter_tag:/, '').trim();
const tag = query.value;
const files = this.plugin.app.vault.getMarkdownFiles();
const files = this.plugin.app.vault.getMarkdownFiles().filter(f=>this.plugin.view.testPathFilter(f.path));

const matchingFiles = await Promise.all(files.map(async (file) => {
const cache = this.plugin.app.metadataCache.getCache(file.path);
Expand Down Expand Up @@ -80,7 +80,7 @@ ${result.map(v => "- [[" + v.replace(/.md$/, "") + "]]").join("\n")}
}
private async tagProcessor(query: queryKey): Promise<Promise<string[]>[]>{
const term = query.value;
const files = this.plugin.app.vault.getMarkdownFiles();
const files = this.plugin.app.vault.getMarkdownFiles().filter(f=>this.plugin.view.testPathFilter(f.path));
const arr = files.map(
async (file) => {
const content = await this.plugin.app.vault.cachedRead(file);
Expand Down Expand Up @@ -175,7 +175,7 @@ ${result.map(v => "- [[" + v.replace(/.md$/, "") + "]]").join("\n")}
private async timeDurationProcessor(query: queryKey): Promise<Promise<string[]>[]> {
const queryDuration = Number(query.value.replace('#','').replace('day',''));

const files = this.plugin.app.vault.getMarkdownFiles();
const files = this.plugin.app.vault.getMarkdownFiles().filter(f=>this.plugin.view.testPathFilter(f.path));
const arr = files.map(
async (file) => {
const content = await this.plugin.app.vault.cachedRead(file);
Expand Down

0 comments on commit 140a67c

Please sign in to comment.