Skip to content

Commit 2c56736

Browse files
committed
fix: handle duplicates urls within a file
1 parent c9cabb2 commit 2c56736

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/utils/find-duplicate-urls.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ export const findDuplicateUrls = async (
88

99
for (const file of files) {
1010
const content = await app.vault.cachedRead(file);
11+
1112
const matches = matchUrls(content);
1213
if (matches) {
13-
for (const url of matches) {
14+
const uniqueMatches = new Set(matches);
15+
for (const url of uniqueMatches) {
1416
if (!urlMap.has(url)) {
1517
urlMap.set(url, []);
1618
}

0 commit comments

Comments
 (0)