Skip to content

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

:art: fix https://github.com/siyuan-note/siyuan/issues/9029

Vanessa55bb5e4348c4
diff --git a/app/electron/boot.html b/app/electron/boot.html
index f5a748b3f2..46d6081aa7 100644
--- a/app/electron/boot.html
+++ b/app/electron/boot.html
@@ -27,7 +27,7 @@
<div id="progress"
style="position: absolute;height: 1px;background-color: #d23f31;transition: width 50ms cubic-bezier(0, 0, 0.2, 1);top:0"></div>
<div id="details"
- style="color: #9aa0a6;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;padding: 8px;"></div>
+ style="color: #9aa0a6;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;padding: 8px;line-height: 1.25"></div>
</div>
<script>
const sleep = (ms) => {
diff --git a/app/src/protyle/render/highlightRender.ts b/app/src/protyle/render/highlightRender.ts
index 9df65d9f5f..1399bdcc5f 100644
--- a/app/src/protyle/render/highlightRender.ts
+++ b/app/src/protyle/render/highlightRender.ts
@@ -93,8 +93,9 @@ export const highlightRender = (element: Element, cdn = Constants.PROTYLE_CDN) =
block.classList.add("protyle-linenumber");
setTimeout(() => {
// windows 需等待字体下载完成再计算,否则导致不换行,高度计算错误
+ // https://github.com/siyuan-note/siyuan/issues/9029
lineNumberRender(block);
- }, 20);
+ }, Constants.TIMEOUT_DBLCLICK);
if (languageElement) {
languageElement.style.marginLeft = "3.6em";
}
@@ -151,7 +152,7 @@ export const lineNumberRender = (block: HTMLElement) => {
let lineHeight = "";
if (isWrap) {
lineNumberTemp.textContent = line || "\n";
- const height = lineNumberTemp.getBoundingClientRect().height;
+ const height = lineNumberTemp.getBoundingClientRect().height.toFixed(1);
lineHeight = ` style="height:${height}px;"`;
}
lineNumberHTML += `<span${lineHeight}></span>`;