diff --git a/src/index.ts b/src/index.ts index edcfecd..45ab0e0 100644 --- a/src/index.ts +++ b/src/index.ts @@ -32,7 +32,14 @@ async function fetchData() { notes.forEach(function(note, id) { var links = note["links"] - for (const link of links) { + for (let link of links) { + + // Slice note link if link directs to an anchor + var index = link.indexOf("#"); + if(index != -1){ + link = link.substr(0,index); + } + var linkDestExists = notes.has(link); if (linkDestExists) { data.edges.push({