From 8da31e7b1c7ad8a5810af77e9d20dced8f8d4f9e Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Fri, 9 Dec 2022 20:22:08 +0800 Subject: [PATCH 1/2] =?UTF-8?q?:bug:=20=E5=AF=BC=E5=85=A5=E7=A9=BA?= =?UTF-8?q?=E5=86=85=E5=AE=B9=20Markdown=20=E6=96=87=E4=BB=B6=E6=97=B6?= =?UTF-8?q?=E6=8A=A5=E9=94=99=20Fix=20https://github.com/siyuan-note/siyua?= =?UTF-8?q?n/issues/6832?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/model/box.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kernel/model/box.go b/kernel/model/box.go index f6ef21498..1020549a3 100644 --- a/kernel/model/box.go +++ b/kernel/model/box.go @@ -464,6 +464,10 @@ func parseKTree(kramdown []byte) (ret *parse.Tree) { } func genTreeID(tree *parse.Tree) { + if nil == tree.Root.FirstChild { + tree.Root.AppendChild(parse.NewParagraph()) + } + ast.Walk(tree.Root, func(n *ast.Node, entering bool) ast.WalkStatus { if !entering { return ast.WalkContinue From 1b43384a1e7bdbb78cb094a78beb792959b63cdd Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Fri, 9 Dec 2022 23:12:47 +0800 Subject: [PATCH 2/2] =?UTF-8?q?:art:=20Windows/macOS=20=E6=A1=8C=E9=9D=A2?= =?UTF-8?q?=E7=AB=AF=E6=94=AF=E6=8C=81=E5=BC=80=E6=9C=BA=E5=90=AF=E5=8A=A8?= =?UTF-8?q?=20https://github.com/siyuan-note/siyuan/issues/6833?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/config/about.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/config/about.ts b/app/src/config/about.ts index 19fc75f38..94432d4ef 100644 --- a/app/src/config/about.ts +++ b/app/src/config/about.ts @@ -397,6 +397,7 @@ export const about = { window.siyuan.config.system.downloadInstallPkg = downloadInstallPkgElement.checked; }); }); + /// #if !BROWSER const autoLaunchElement = about.element.querySelector("#autoLaunch") as HTMLInputElement; autoLaunchElement.addEventListener("change", () => { fetchPost("/api/system/setAutoLaunch", {autoLaunch: autoLaunchElement.checked}, () => { @@ -404,6 +405,7 @@ export const about = { app.setLoginItemSettings({openAtLogin: autoLaunchElement.checked}); }); }); + /// #endif about.element.querySelector("#aboutConfirm").addEventListener("click", () => { const scheme = (about.element.querySelector("#aboutScheme") as HTMLInputElement).value; const host = (about.element.querySelector("#aboutHost") as HTMLInputElement).value;