From a656626742e3a475731a4d27e0a7f9292ecbaa22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Thu, 15 Apr 2021 21:11:30 +0800 Subject: stash --- script/core/guide.lua | 7 +++++++ script/core/linker.lua | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'script/core') diff --git a/script/core/guide.lua b/script/core/guide.lua index dd7888c6..edd682fc 100644 --- a/script/core/guide.lua +++ b/script/core/guide.lua @@ -139,6 +139,12 @@ function m.searchRefs(status, source, mode) end end + ---@param link link + local function checkParentID(link) + local id = link.id + local parentID = link.parentID + end + for _ = 1, 1000 do if index <= 0 then break @@ -155,6 +161,7 @@ function m.searchRefs(status, source, mode) checkForward(eachLink) checkBackward(eachLink) end + checkParentID(link) ::CONTINUE:: end end diff --git a/script/core/linker.lua b/script/core/linker.lua index 64aaef1c..46a76127 100644 --- a/script/core/linker.lua +++ b/script/core/linker.lua @@ -147,7 +147,10 @@ local function getID(source) end util.revertTable(IDList) local id = table.concat(IDList, '|') - local parentID = table.concat(IDList, '|', 1, -2) + local parentID + if #IDList > 1 then + parentID = table.concat(IDList, '|', 1, -2) + end return id, current, parentID end -- cgit v1.2.3