Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:lipstick: https://github.com/siyuan-note/siyuan/issues/12862

Vanessa66f711d48d8f
diff --git a/app/src/protyle/wysiwyg/renderBacklink.ts b/app/src/protyle/wysiwyg/renderBacklink.ts
index 143b0bdba3..ff7c6cbaeb 100644
--- a/app/src/protyle/wysiwyg/renderBacklink.ts
+++ b/app/src/protyle/wysiwyg/renderBacklink.ts
@@ -16,7 +16,7 @@ export const renderBacklink = (protyle: IProtyle, backlinkData: {
protyle.block.showAll = true;
let html = "";
backlinkData.forEach(item => {
- html += genBreadcrumb(item.blockPaths) + setBacklinkFold(item.dom, item.expand);
+ html += genBreadcrumb(item.blockPaths, false, backlinkData.length) + setBacklinkFold(item.dom, item.expand);
});
protyle.wysiwyg.element.innerHTML = html;
processRender(protyle.wysiwyg.element);
@@ -99,9 +99,9 @@ export const getBacklinkHeadingMore = (moreElement: HTMLElement) => {
moreElement.remove();
};
-export const genBreadcrumb = (blockPaths: IBreadcrumb[], renderFirst = false) => {
+export const genBreadcrumb = (blockPaths: IBreadcrumb[], renderFirst: boolean, parentLength?: number) => {
if (1 > blockPaths.length) {
- return '<div contenteditable="false" style="border-top: 1px solid var(--b3-border-color);min-height: 0;width: 100%;" class="protyle-breadcrumb__bar"><span></span></div>';
+ return `<div contenteditable="false" style="border-top: ${parentLength === 1 ? 0 : 1}px solid var(--b3-border-color);min-height: 0;width: 100%;" class="protyle-breadcrumb__bar"><span></span></div>`;
}
let html = "";