Skip to content

Commit

Permalink
🎨 fix #11408
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 committed May 15, 2024
1 parent 0fa75ec commit 4335988
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/src/assets/scss/component/_typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions app/src/protyle/render/highlightRender.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 4335988

Please sign in to comment.