|
@@ -16,7 +16,7 @@ export const renderBacklink = (protyle: IProtyle, backlinkData: {
|
|
protyle.block.showAll = true;
|
|
protyle.block.showAll = true;
|
|
let html = "";
|
|
let html = "";
|
|
backlinkData.forEach(item => {
|
|
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;
|
|
protyle.wysiwyg.element.innerHTML = html;
|
|
processRender(protyle.wysiwyg.element);
|
|
processRender(protyle.wysiwyg.element);
|
|
@@ -99,9 +99,9 @@ export const getBacklinkHeadingMore = (moreElement: HTMLElement) => {
|
|
moreElement.remove();
|
|
moreElement.remove();
|
|
};
|
|
};
|
|
|
|
|
|
-export const genBreadcrumb = (blockPaths: IBreadcrumb[], renderFirst = false) => {
|
|
|
|
|
|
+export const genBreadcrumb = (blockPaths: IBreadcrumb[], renderFirst: boolean, parentLength?: number) => {
|
|
if (1 > blockPaths.length) {
|
|
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 = "";
|
|
let html = "";
|