diff --git a/src/MyGraph.ts b/src/MyGraph.ts index 08a69d8..bf215bb 100644 --- a/src/MyGraph.ts +++ b/src/MyGraph.ts @@ -134,9 +134,9 @@ export default class MyGraph extends Graph { const preCocitations: { [name: string]: [number, CoCitation[]] } = {} let spl = a.split('/') - let ownBasename = spl[spl.length - 1] + let ownBasename = spl[spl.length - 1].toLowerCase(); const ownLinks = cache.links.filter((link) => { - return link.link === ownBasename + return link.link.toLowerCase() === ownBasename }) const cachedRead = await this.app.vault.cachedRead(file) @@ -209,7 +209,7 @@ export default class MyGraph extends Graph { cache.headings && cache.headings.length > 0 ? maxHeadingLevel : 0 cache.links.forEach((link) => { - if (link.link === ownBasename) return + if (link.link.toLowerCase() === ownBasename) return // Initialize to 0 if not set yet if (!(link.link in preCocitations)) { @@ -350,6 +350,7 @@ export default class MyGraph extends Graph { }) }) + // Add the found weights to the results for (let key in preCocitations) { const file = mdCache.getFirstLinkpathDest(key, '')