From 197e86476a44bca92e84280bd1aed469531e2edf Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Thu, 30 Jan 2025 14:14:33 +0800 Subject: [PATCH] :art: Improve missing assets checking https://github.com/siyuan-note/siyuan/issues/13891 --- kernel/model/assets.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/kernel/model/assets.go b/kernel/model/assets.go index 915a0e039..4741f8351 100644 --- a/kernel/model/assets.go +++ b/kernel/model/assets.go @@ -965,6 +965,15 @@ func MissingAssets() (ret []string) { continue } + if strings.Contains(strings.ToLower(dest), ".pdf/") { + if idx := strings.LastIndex(dest, "/"); -1 < idx { + if ast.IsNodeIDPattern(dest[idx+1:]) { + // PDF 标注不计入 https://github.com/siyuan-note/siyuan/issues/13891 + continue + } + } + } + if "" == assetsPathMap[dest] { if strings.HasPrefix(dest, "assets/.") { // Assets starting with `.` should not be considered missing assets https://github.com/siyuan-note/siyuan/issues/8821