From fd3462cd370a2baeb5d101de2b17c5690b752808 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Sat, 29 Oct 2022 22:42:53 +0800 Subject: [PATCH 1/4] =?UTF-8?q?:bug:=20=E6=A0=87=E8=AE=B0=E5=85=AC?= =?UTF-8?q?=E5=BC=8F=E4=B8=BA=E6=A0=87=E7=AD=BE=E5=90=8E=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E5=9C=A8=E6=A0=87=E7=AD=BE=E9=9D=A2=E6=9D=BF=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E6=A0=87=E7=AD=BE=20Fix=20https://github.com/siyuan-note/siyua?= =?UTF-8?q?n/issues/6401?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/go.mod | 2 +- kernel/go.sum | 12 ++---------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/kernel/go.mod b/kernel/go.mod index 430374b66..79c81cb59 100644 --- a/kernel/go.mod +++ b/kernel/go.mod @@ -6,7 +6,7 @@ require ( github.com/88250/clipboard v0.1.5 github.com/88250/css v0.1.2 github.com/88250/gulu v1.2.3-0.20221021091528-70e533d91a88 - github.com/88250/lute v1.7.5-0.20221029140104-a3b608bdb658 + github.com/88250/lute v1.7.5-0.20221029143836-e25e72d2a557 github.com/88250/pdfcpu v0.3.13 github.com/88250/vitess-sqlparser v0.0.0-20210205111146-56a2ded2aba1 github.com/ConradIrwin/font v0.0.0-20210318200717-ce8d41cc0732 diff --git a/kernel/go.sum b/kernel/go.sum index 5019b1ed5..5be60a3a9 100644 --- a/kernel/go.sum +++ b/kernel/go.sum @@ -17,14 +17,8 @@ github.com/88250/go-sqlite3 v1.14.13-0.20220714142610-fbbda1ee84f5 h1:8HdZozCsXS github.com/88250/go-sqlite3 v1.14.13-0.20220714142610-fbbda1ee84f5/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/88250/gulu v1.2.3-0.20221021091528-70e533d91a88 h1:Ax1/qJEF0Ipc2FtgHJEXy3EExpPsT3VKlGEbWlJFBwQ= github.com/88250/gulu v1.2.3-0.20221021091528-70e533d91a88/go.mod h1:I1qBzsksFL2ciGSuqDE7R3XW4BUMrfDgOvSXEk7FsAI= -github.com/88250/lute v1.7.5-0.20221022153730-92ba7f9ffcb9 h1:ATtPDhZ7/DbbdU+DyKTMiCSBdk00MYD/46i/eAUbE/8= -github.com/88250/lute v1.7.5-0.20221022153730-92ba7f9ffcb9/go.mod h1:cEoBGi0zArPqAsp0MdG9SKinvH/xxZZWXU7sRx8vHSA= -github.com/88250/lute v1.7.5-0.20221025110546-319a4ded6c94 h1:mi9O3bjQjUKmsFS79l6eviXwrBXQKVowp5j/Dg5AOqc= -github.com/88250/lute v1.7.5-0.20221025110546-319a4ded6c94/go.mod h1:cEoBGi0zArPqAsp0MdG9SKinvH/xxZZWXU7sRx8vHSA= -github.com/88250/lute v1.7.5-0.20221027150010-0f7df877941b h1:tlgbBAtUCQ2jl3Cu+TFVbdndBXdScpRj7PIOXGHMo/Q= -github.com/88250/lute v1.7.5-0.20221027150010-0f7df877941b/go.mod h1:cEoBGi0zArPqAsp0MdG9SKinvH/xxZZWXU7sRx8vHSA= -github.com/88250/lute v1.7.5-0.20221029140104-a3b608bdb658 h1:WlnLSxxLG4lROkwtwfC3RoYfan9kbrjnVv4ylYIQT2w= -github.com/88250/lute v1.7.5-0.20221029140104-a3b608bdb658/go.mod h1:cEoBGi0zArPqAsp0MdG9SKinvH/xxZZWXU7sRx8vHSA= +github.com/88250/lute v1.7.5-0.20221029143836-e25e72d2a557 h1:0swESsHjzPXzDSFcD2q2dVefn3yaSF5hV6zfkF0u0Go= +github.com/88250/lute v1.7.5-0.20221029143836-e25e72d2a557/go.mod h1:cEoBGi0zArPqAsp0MdG9SKinvH/xxZZWXU7sRx8vHSA= github.com/88250/pdfcpu v0.3.13 h1:touMWMZkCGalMIbEg9bxYp7rETM+zwb9hXjwhqi4I7Q= github.com/88250/pdfcpu v0.3.13/go.mod h1:S5YT38L/GCjVjmB4PB84PymA1qfopjEhfhTNQilLpv4= github.com/88250/vitess-sqlparser v0.0.0-20210205111146-56a2ded2aba1 h1:48T899JQDwyyRu9yXHePYlPdHtpJfrJEUGBMH3SMBWY= @@ -358,8 +352,6 @@ github.com/shurcooL/reactions v0.0.0-20181006231557-f2e0b4ca5b82/go.mod h1:TCR1l github.com/shurcooL/sanitized_anchor_name v0.0.0-20170918181015-86672fcb3f95/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/shurcooL/users v0.0.0-20180125191416-49c67e49c537/go.mod h1:QJTqeLYEDaXHZDBsXlPCDqdhQuJkuw4NOtaxYe3xii4= github.com/shurcooL/webdavfs v0.0.0-20170829043945-18c3829fa133/go.mod h1:hKmq5kWdCj2z2KEozexVbfEZIWiTjhE0+UjmZgPqehw= -github.com/siyuan-note/dejavu v0.0.0-20221023014147-5c1359ab1fb4 h1:W9Kg+Slsm1yOwcoLTeXP85mEqCb4jW/dL7YiQg26OKc= -github.com/siyuan-note/dejavu v0.0.0-20221023014147-5c1359ab1fb4/go.mod h1:i245FL1nmWaLlor+79tGDWZrAPeDvFOkHPJbZ844PyM= github.com/siyuan-note/dejavu v0.0.0-20221023024107-17bf52da95a1 h1:sk6pyVp22MfFXK8C5YOKD5eqWtvcMnkiEh1nyZlw4aU= github.com/siyuan-note/dejavu v0.0.0-20221023024107-17bf52da95a1/go.mod h1:f+6y7KcTLlk2N2dLl5HeV/YzkyCTEqWNoMiWT0gkMi8= github.com/siyuan-note/encryption v0.0.0-20220713091850-5ecd92177b75 h1:Bi7/7f29LW+Fm0cHc0J1NO1cZqyJwljSWVmfOqVZgaE= From e6365543d0b8687c619494c8ebe5208ed4b550e3 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Sat, 29 Oct 2022 23:07:59 +0800 Subject: [PATCH 2/4] =?UTF-8?q?:memo:=20=E6=9B=B4=E6=96=B0=E5=BC=80?= =?UTF-8?q?=E5=8F=91=E6=8C=87=E5=8D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/CONTRIBUTING.md | 2 ++ .github/CONTRIBUTING_zh_CN.md | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 00aa3528a..e76c1b03f 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -32,6 +32,8 @@ On the desktop, go to the app folder to run: * `pnpm run dev` * `pnpm run start` +Note: In the development environment, the kernel process will not be automatically started, and you need to manually start the kernel process first. + ## Kernel ### Desktop diff --git a/.github/CONTRIBUTING_zh_CN.md b/.github/CONTRIBUTING_zh_CN.md index 695d8763f..be13db46e 100644 --- a/.github/CONTRIBUTING_zh_CN.md +++ b/.github/CONTRIBUTING_zh_CN.md @@ -31,6 +31,8 @@ NPM 镜像: * `pnpm run dev` * `pnpm run start` +注意:在开发环境下不会自动拉起内核进程,需要先手动拉起内核进程。 + ## 内核 ### 桌面端 From a6e9199d88ddb111a2329a91b23995e543fcbaf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A2=96=E9=80=B8?= <49649786+Zuoqiu-Yingyi@users.noreply.github.com> Date: Sat, 29 Oct 2022 23:31:48 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E9=89=B4=E6=9D=83=E5=85=BC=E5=AE=B9=20IPv6?= =?UTF-8?q?=20=E6=9C=AC=E6=9C=BA=E5=9B=9E=E7=8E=AF=E5=9C=B0=E5=9D=80=20(#6?= =?UTF-8?q?400)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * :bug: fix #5857 * :art: #5990 桌面端 `SiYuan` 可执行程序支持使用参数连接非本机内核服务 * :art: style * :art: style * :art: style * 🎨 改进伺服代码片段 `/snippets/` #6356 * :art: 调整 win 安装包打包选项 * :art: 鉴权支持 IPv6 本机回环地址 --- kernel/model/session.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kernel/model/session.go b/kernel/model/session.go index b82dd6c44..b4607454c 100644 --- a/kernel/model/session.go +++ b/kernel/model/session.go @@ -171,8 +171,10 @@ func CheckAuth(c *gin.Context) { } // 放过来自本机的某些请求 - if strings.HasPrefix(c.Request.RemoteAddr, util.LocalHost) || strings.HasPrefix(c.Request.RemoteAddr, "127.0.0.1") { - if strings.HasPrefix(c.Request.RequestURI, "/assets/") || strings.HasPrefix(c.Request.RequestURI, "/history/assets/") { + if strings.HasPrefix(c.Request.RemoteAddr, util.LocalHost) || + strings.HasPrefix(c.Request.RemoteAddr, "127.0.0.1") || + strings.HasPrefix(c.Request.RemoteAddr, "[::1]") { + if strings.HasPrefix(c.Request.RequestURI, "/assets/") { c.Next() return } From 7f759034756138f349a76e950a6b89d1fe53e381 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Sat, 29 Oct 2022 23:51:34 +0800 Subject: [PATCH 4/4] =?UTF-8?q?:bug:=20=E4=BF=AE=E6=94=B9=E5=91=BD?= =?UTF-8?q?=E5=90=8D=E6=96=87=E6=A1=A3=E5=9D=97=E5=90=8E=E5=BC=95=E7=94=A8?= =?UTF-8?q?=E5=8A=A8=E6=80=81=E9=94=9A=E6=96=87=E6=9C=AC=E6=9C=AA=E8=B7=9F?= =?UTF-8?q?=E9=9A=8F=20https://github.com/siyuan-note/siyuan/issues/6398?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/model/blockial.go | 6 ++++++ kernel/model/file.go | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/kernel/model/blockial.go b/kernel/model/blockial.go index 428be97f3..59231d2fc 100644 --- a/kernel/model/blockial.go +++ b/kernel/model/blockial.go @@ -179,6 +179,12 @@ func ResetBlockAttrs(id string, nameValues map[string]string) (err error) { } } + if ast.NodeDocument == node.Type { + // 修改命名文档块后引用动态锚文本未跟随 https://github.com/siyuan-note/siyuan/issues/6398 + // 使用重命名文档队列来刷新引用锚文本 + updateRefTextRenameDoc(tree) + } + if err = indexWriteJSONQueue(tree); nil != err { return } diff --git a/kernel/model/file.go b/kernel/model/file.go index 55c28e850..eb18bf34c 100644 --- a/kernel/model/file.go +++ b/kernel/model/file.go @@ -1235,7 +1235,7 @@ func RenameDoc(boxID, p, title string) (err error) { util.PushEvent(evt) box.renameSubTrees(tree) - go updateRefTextRenameDoc(tree) + updateRefTextRenameDoc(tree) IncSync() return }