Skip to content

Commit

Permalink
Remove dataview to debug
Browse files Browse the repository at this point in the history
  • Loading branch information
blindmansion committed May 10, 2024
1 parent 4ac5537 commit 3074952
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1235,13 +1235,20 @@ export class Run {
* The QUERY TEXT is passed to the dataview plugin to get the output of the query
*/
async replaceDataviewQueries(content: string): Promise<string> {
// bail everything (debbugging this)
return content;


const blockRegex = /(\{\{\s*)?```dataview\s*([\s\S]*?)```(\s*)(\}\})?/g;

// If there are no dataview queries, return the content as is
if (!blockRegex.test(content)) {
return content;
}

const dvApi = getAPI(this.cannoli.app);

if (!dvApi) {
// TODO show message in canvas
console.warn("Dataview API not available. Skipping dataview queries.");
return content;
}

Expand Down

0 comments on commit 3074952

Please sign in to comment.