From 771a42af3da5a06000d71615a278b1d480cb8f48 Mon Sep 17 00:00:00 2001 From: Ross Keenan Date: Sun, 2 Jan 2022 18:40:37 +0200 Subject: [PATCH] fix(CreateIndex): :bug: Sinks are nodes with no outgoing **ups** (fix #231) --- main.js | 3 ++- src/main.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index d8fa401d..164fb76f 100644 --- a/main.js +++ b/main.js @@ -51899,7 +51899,8 @@ class BCPlugin extends require$$0.Plugin { const g = getSubInDirs(mainG, "up", "down"); const closed = getReflexiveClosure(g, settings.userHiers); const onlyDowns = getSubInDirs(closed, "down"); - const sinks = getSinks(mainG); + const onlyUps = getSubInDirs(closed, "up"); + const sinks = getSinks(onlyUps); let globalIndex = ""; sinks.forEach((terminal) => { globalIndex += terminal + "\n"; diff --git a/src/main.ts b/src/main.ts index 1bd5ff8e..63af5d5a 100644 --- a/src/main.ts +++ b/src/main.ts @@ -365,8 +365,9 @@ export default class BCPlugin extends Plugin { const g = getSubInDirs(mainG, "up", "down"); const closed = getReflexiveClosure(g, settings.userHiers); const onlyDowns = getSubInDirs(closed, "down"); + const onlyUps = getSubInDirs(closed, "up"); - const sinks = getSinks(mainG); + const sinks = getSinks(onlyUps); let globalIndex = ""; sinks.forEach((terminal) => {