Skip to content

Commit

Permalink
Updated
Browse files Browse the repository at this point in the history
  • Loading branch information
dsebastien committed May 13, 2024
1 parent d9fdee6 commit f459ccf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions apps/plugin/src/app/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,10 @@ export class DataviewSerializerPlugin extends Plugin {
log('Scanning and serializing all Dataview queries', 'debug');
const allVaultFiles = this.app.vault.getMarkdownFiles();

let updatedFilesCount = 0;

for (const vaultFile of allVaultFiles) {
this.settings.foldersToScan.some(async (ignoredFolder) => {
if (vaultFile.path.startsWith(ignoredFolder)) {
await this.processFile(vaultFile);
updatedFilesCount++;
}
});
}
Expand Down Expand Up @@ -236,12 +233,13 @@ export class DataviewSerializerPlugin extends Plugin {
// Reference: https://github.com/IdreesInc/Waypoint/blob/master/main.ts
const serializedQuery = await serializeQuery(
foundQuery,
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
this.dataviewApi!
);
//log('Serialized query: ', 'debug', serializedQuery);

if ('' !== serializedQuery) {
let escapedQuery = escapeRegExp(foundQuery);
const escapedQuery = escapeRegExp(foundQuery);

const queryToSerializeRegex = new RegExp(
`${QUERY_FLAG_OPEN}${escapedQuery}.*${QUERY_FLAG_CLOSE}\\n`,
Expand Down Expand Up @@ -299,6 +297,7 @@ export class DataviewSerializerPlugin extends Plugin {

// Make sure the file was not modified too recently (avoid update loops)
if (this.nextPossibleUpdates.has(file.path)) {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const nextPossibleUpdateForFile = this.nextPossibleUpdates.get(
file.path
)!;
Expand Down
2 changes: 1 addition & 1 deletion nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@
}
}
],
"nxCloudAccessToken": "NTAwMWU2NTEtZTc1My00ZDljLTlhZjUtMzc2MmFkYjlmYWEzfHJlYWQtd3JpdGU="
"nxCloudAccessToken": "ZTlkZTIxMmMtZTNiMC00OGNmLWI1ZTUtZDk4OTA0NTA0MjM1fHJlYWQtd3JpdGU=="
}

0 comments on commit f459ccf

Please sign in to comment.