Skip to content

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

:rotating_light:

Vanessa0c17c68a2892
diff --git a/app/src/protyle/gutter/index.ts b/app/src/protyle/gutter/index.ts
index 237283d634..427c24375d 100644
--- a/app/src/protyle/gutter/index.ts
+++ b/app/src/protyle/gutter/index.ts
@@ -254,9 +254,9 @@ export class Gutter {
const itemRect = item.getBoundingClientRect();
let gutterTop = this.element.getBoundingClientRect().top + 4;
if (itemRect.height < Math.floor(window.siyuan.config.editor.fontSize * 1.625) + 8) {
- gutterTop = gutterTop - (itemRect.height - this.element.clientHeight) / 2
+ gutterTop = gutterTop - (itemRect.height - this.element.clientHeight) / 2;
}
- return itemRect.top <= gutterTop && itemRect.bottom >= gutterTop
+ return itemRect.top <= gutterTop && itemRect.bottom >= gutterTop;
}
private turnsOneInto(options: {
diff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.ts
index 82261962d4..a51d7273fd 100644
--- a/app/src/protyle/wysiwyg/keydown.ts
+++ b/app/src/protyle/wysiwyg/keydown.ts
@@ -701,7 +701,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
}
// 行首转义符前删除 https://github.com/siyuan-note/siyuan/issues/6092
if (range.startOffset === 0 &&
- previousSibling && previousSibling.parentElement.getAttribute("data-type").indexOf('backslash') > -1 &&
+ previousSibling && previousSibling.parentElement.getAttribute("data-type").indexOf("backslash") > -1 &&
previousSibling.nodeType !== 3 && (previousSibling as HTMLElement).outerHTML === "<span>\\</span>" &&
!hasPreviousSibling(previousSibling)) {
range.setStartBefore(previousSibling.parentElement);
@@ -712,7 +712,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
}
// 光标位于转义符前 F5 后,rang 和点击后的不同,也需进行判断
if (range.startOffset === 1 && range.startContainer.nodeType !== 3 &&
- range.startContainer.parentElement.getAttribute("data-type").indexOf('backslash') > -1 &&
+ range.startContainer.parentElement.getAttribute("data-type").indexOf("backslash") > -1 &&
!hasPreviousSibling(range.startContainer.parentElement)) {
range.setStartBefore(range.startContainer.parentElement);
removeBlock(protyle, nodeElement, range);