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/11408

Vanessa43359889d140
diff --git a/app/src/assets/scss/component/_typography.scss b/app/src/assets/scss/component/_typography.scss
index e7e234c78f..e82f7ac28f 100644
--- a/app/src/assets/scss/component/_typography.scss
+++ b/app/src/assets/scss/component/_typography.scss
@@ -609,7 +609,7 @@
&-task {
list-style: none !important;
- word-break: break-all;
+ word-break: break-word;
position: relative;
&--done > div[data-node-id].p {
diff --git a/app/src/protyle/render/highlightRender.ts b/app/src/protyle/render/highlightRender.ts
index 7105d9ec34..05920b43db 100644
--- a/app/src/protyle/render/highlightRender.ts
+++ b/app/src/protyle/render/highlightRender.ts
@@ -75,7 +75,7 @@ export const highlightRender = (element: Element, cdn = Constants.PROTYLE_CDN) =
const lineNumber = block.parentElement.getAttribute("linenumber");
if (autoEnter === "true" || (autoEnter !== "false" && window.siyuan.config.editor.codeLineWrap)) {
block.style.setProperty("white-space", "pre-wrap");
- block.style.setProperty("word-break", "break-all");
+ block.style.setProperty("word-break", "break-word");
} else {
// https://ld246.com/article/1684031600711 该属性会导致有 tab 后光标跳至末尾,目前无解
block.style.setProperty("white-space", "pre");
@@ -137,7 +137,7 @@ export const lineNumberRender = (block: HTMLElement) => {
if (lineList[lineList.length - 1] === "" && lineList.length > 1) {
lineList.pop();
}
- const isWrap = block.style.wordBreak === "break-all";
+ const isWrap = block.style.wordBreak === "break-word";
lineList.map((line) => {
let lineHeight = "";
if (isWrap) {