From e9b8ff7a55653006fc6460fb25a383207d43815f Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Sun, 16 Feb 2025 17:25:05 +0800 Subject: [PATCH] :art: Hide text in breadcrumb of last non-document path in embed block https://github.com/siyuan-note/siyuan/issues/13866 --- kernel/model/blockinfo.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/kernel/model/blockinfo.go b/kernel/model/blockinfo.go index c68ef1717..f5043dc15 100644 --- a/kernel/model/blockinfo.go +++ b/kernel/model/blockinfo.go @@ -554,8 +554,15 @@ func buildBlockBreadcrumb(node *ast.Node, excludeTypes []string, isEmbedBlock bo name = util.UnescapeHTML(name) name = util.EscapeHTML(name) - if !isEmbedBlock && parent == node { - name = "" + if !isEmbedBlock { + if parent == node { + name = "" + } + } else { + if ast.NodeDocument != parent.Type { + // 在嵌入块中隐藏最后一个非文档路径的面包屑中的文本 Hide text in breadcrumb of last non-document path in embed block https://github.com/siyuan-note/siyuan/issues/13866 + name = "" + } } if add {