Vanessa 2026-01-08 10:54:01 +08:00
parent 8c4487fe84
commit 4c22357a80
2 changed files with 5 additions and 2 deletions

View file

@ -4,7 +4,7 @@
"description": "Refactor your thinking",
"homepage": "https://b3log.org/siyuan",
"main": "./electron/main.js",
"packageManager": "pnpm@10.22.0",
"packageManager": "pnpm@10.27.0",
"scripts": {
"lint": "eslint . --fix --cache",
"dev": "webpack --mode development",

View file

@ -1492,7 +1492,7 @@ export class Gutter {
hideElements(["gutter"], protyle);
}
}).element);
} else if (type === "NodeCodeBlock" && !protyle.disabled && !nodeElement.getAttribute("data-subtype")) {
} else if (type === "NodeCodeBlock" && !nodeElement.getAttribute("data-subtype")) {
window.siyuan.menus.menu.append(new MenuItem({id: "separator_code", type: "separator"}).element);
const linewrap = nodeElement.getAttribute("linewrap");
const ligatures = nodeElement.getAttribute("ligatures");
@ -1506,6 +1506,7 @@ export class Gutter {
submenu: [{
id: "md31",
iconHTML: "",
ignore: protyle.disabled,
label: `<div class="fn__flex" style="margin-bottom: 4px"><span>${window.siyuan.languages.md31}</span><span class="fn__space fn__flex-1"></span>
<input type="checkbox" class="b3-switch fn__flex-center"${linewrap === "true" ? " checked" : ((window.siyuan.config.editor.codeLineWrap && linewrap !== "false") ? " checked" : "")}></div>`,
bind(element) {
@ -1527,6 +1528,7 @@ export class Gutter {
}, {
id: "md2",
iconHTML: "",
ignore: protyle.disabled,
label: `<div class="fn__flex" style="margin-bottom: 4px"><span>${window.siyuan.languages.md2}</span><span class="fn__space fn__flex-1"></span>
<input type="checkbox" class="b3-switch fn__flex-center"${ligatures === "true" ? " checked" : ((window.siyuan.config.editor.codeLigatures && ligatures !== "false") ? " checked" : "")}></div>`,
bind(element) {
@ -1548,6 +1550,7 @@ export class Gutter {
}, {
id: "md27",
iconHTML: "",
ignore: protyle.disabled,
label: `<div class="fn__flex" style="margin-bottom: 4px"><span>${window.siyuan.languages.md27}</span><span class="fn__space fn__flex-1"></span>
<input type="checkbox" class="b3-switch fn__flex-center"${linenumber === "true" ? " checked" : ((window.siyuan.config.editor.codeSyntaxHighlightLineNum && linenumber !== "false") ? " checked" : "")}></div>`,
bind(element) {