From 397bf47a24ca8bc835bbd34ee0f054969e9bc339 Mon Sep 17 00:00:00 2001 From: Janik von Rotz Date: Tue, 18 Jan 2022 12:02:27 +0100 Subject: [PATCH] remove duplicate backlinks --- build.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/build.js b/build.js index cda0da12..848d7cec 100644 --- a/build.js +++ b/build.js @@ -157,9 +157,8 @@ if (!firstArg || ['all', 'convert'].indexOf(firstArg) > 0) { let backLinks = links.filter(link => link.target === fileName) // remove duplicates - let backLinkSet = new Set(backLinks) - backLinks = [...backLinkSet] - + backLinks = Array.from(new Set(backLinks.map(o => JSON.stringify(o)))).map(s => JSON.parse(s)) + content = content + [ '\n', '\n',