mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 17:10:12 +01:00
This commit is contained in:
parent
0fa75ec71a
commit
43359889d1
2 changed files with 3 additions and 3 deletions
|
|
@ -609,7 +609,7 @@
|
||||||
|
|
||||||
&-task {
|
&-task {
|
||||||
list-style: none !important;
|
list-style: none !important;
|
||||||
word-break: break-all;
|
word-break: break-word;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
&--done > div[data-node-id].p {
|
&--done > div[data-node-id].p {
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@ export const highlightRender = (element: Element, cdn = Constants.PROTYLE_CDN) =
|
||||||
const lineNumber = block.parentElement.getAttribute("linenumber");
|
const lineNumber = block.parentElement.getAttribute("linenumber");
|
||||||
if (autoEnter === "true" || (autoEnter !== "false" && window.siyuan.config.editor.codeLineWrap)) {
|
if (autoEnter === "true" || (autoEnter !== "false" && window.siyuan.config.editor.codeLineWrap)) {
|
||||||
block.style.setProperty("white-space", "pre-wrap");
|
block.style.setProperty("white-space", "pre-wrap");
|
||||||
block.style.setProperty("word-break", "break-all");
|
block.style.setProperty("word-break", "break-word");
|
||||||
} else {
|
} else {
|
||||||
// https://ld246.com/article/1684031600711 该属性会导致有 tab 后光标跳至末尾,目前无解
|
// https://ld246.com/article/1684031600711 该属性会导致有 tab 后光标跳至末尾,目前无解
|
||||||
block.style.setProperty("white-space", "pre");
|
block.style.setProperty("white-space", "pre");
|
||||||
|
|
@ -137,7 +137,7 @@ export const lineNumberRender = (block: HTMLElement) => {
|
||||||
if (lineList[lineList.length - 1] === "" && lineList.length > 1) {
|
if (lineList[lineList.length - 1] === "" && lineList.length > 1) {
|
||||||
lineList.pop();
|
lineList.pop();
|
||||||
}
|
}
|
||||||
const isWrap = block.style.wordBreak === "break-all";
|
const isWrap = block.style.wordBreak === "break-word";
|
||||||
lineList.map((line) => {
|
lineList.map((line) => {
|
||||||
let lineHeight = "";
|
let lineHeight = "";
|
||||||
if (isWrap) {
|
if (isWrap) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue