Skip to content

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

:art: https://github.com/siyuan-note/siyuan/issues/16805

Vanessa0a4c0c01fe44
diff --git a/app/src/assets/scss/protyle/_wysiwyg.scss b/app/src/assets/scss/protyle/_wysiwyg.scss
index d97beb7242..45fbfab2a7 100644
--- a/app/src/assets/scss/protyle/_wysiwyg.scss
+++ b/app/src/assets/scss/protyle/_wysiwyg.scss
@@ -238,6 +238,13 @@
border-radius: var(--b3-border-radius);
}
}
+
+ & > div[fold="1"][data-type="NodeHeading"]::before {
+ left: -6px;
+ height: 7px;
+ width: 7px;
+ margin-top: -4px;
+ }
}
&[style*="direction: rtl"] {
@@ -633,18 +640,23 @@
div[fold="1"][data-type="NodeHeading"]::before {
content: "";
- height: 16px !important;
+ height: 16px;
width: 16px;
background: var(--b3-theme-surface-lighter);
display: block;
position: absolute;
- left: -18px !important;
- top: 50% !important;
+ left: -18px;
+ top: 50%;
border-radius: var(--b3-border-radius-b);
margin-top: -8px;
border-left: 0 !important;
}
+ .bq > div[fold="1"][data-type="NodeHeading"]::before,
+ .callout-content > div[fold="1"][data-type="NodeHeading"]::before {
+ left: -26px;
+ }
+
[data-node-id][fold="1"]:not(.li):not([data-type="NodeHeading"]) {
@include mixin.text-clamp(1);
opacity: .38;
diff --git a/app/src/protyle/gutter/index.ts b/app/src/protyle/gutter/index.ts
index 4b951e42d9..7d53c03b49 100644
--- a/app/src/protyle/gutter/index.ts
+++ b/app/src/protyle/gutter/index.ts
@@ -37,7 +37,7 @@ import {highlightRender} from "../render/highlightRender";
import {blockRender} from "../render/blockRender";
import {getContenteditableElement, getParentBlock, getTopAloneElement, isNotEditBlock} from "../wysiwyg/getBlock";
import * as dayjs from "dayjs";
-import {fetchPost, fetchSyncPost} from "../../util/fetch";
+import {fetchPost} from "../../util/fetch";
import {cancelSB, genEmptyElement, getLangByType, insertEmptyBlock, jumpToParent,} from "../../block/util";
import {countBlockWord} from "../../layout/status";
import {Constants} from "../../constants";
@@ -2557,8 +2557,9 @@ export class Gutter {
dataNodeId = nodeElement.getAttribute("data-node-id");
}
}
- if (type === "NodeListItem" && index === 1) {
- // 列表项中第一层不显示
+ // - > # 1 \n > 2
+ if (type === "NodeListItem" && index > 0) {
+ // 列表项内的块不显示块标
html = "";
}
index += 1;