Skip to content

Commit

Permalink
fix: disable commands on excalidraw files
Browse files Browse the repository at this point in the history
  • Loading branch information
Mara-Li committed May 29, 2024
1 parent 3c4cbeb commit e2e3e08
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/utils/data_validation_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ export function isShared(
file: TFile,
otherRepo: Repository | null
): boolean {
if (!file || file.extension !== "md") {
if (!file || file.extension !== "md" || !file.name.endsWith(".excalidraw.md"))
return false;
}

const otherRepoWithShareAll = settings.github.otherRepo.filter(
(repo) => repo.shareAll?.enable
);
Expand All @@ -129,9 +129,9 @@ export function isShared(
isExcludedPath(settings, file, otherRepo) ||
meta[shareKey] === undefined ||
["false", "0", "no"].includes(meta[shareKey].toString().toLowerCase())
) {
)
return false;
}

const shareKeyInFrontmatter: string = meta[shareKey].toString().toLowerCase();
return ["true", "1", "yes"].includes(shareKeyInFrontmatter);
} else if (settings.plugin.shareAll?.enable || otherRepoWithShareAll.length > 0) {
Expand Down

0 comments on commit e2e3e08

Please sign in to comment.