From 7d39c6447e8839dcb886f725ce909d7a62067795 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Thu, 1 Sep 2022 22:26:17 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E5=AF=BC=E5=85=A5=20Markdown=20?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E6=8A=A5=E9=94=99=20Fix=20https://github.com?= =?UTF-8?q?/siyuan-note/siyuan/issues/5781?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/model/import.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/model/import.go b/kernel/model/import.go index aa45d8458..5a46b8c49 100644 --- a/kernel/model/import.go +++ b/kernel/model/import.go @@ -127,7 +127,7 @@ func ImportSY(zipPath, boxID, toPath string) (err error) { if ast.NodeBlockRefID == n.Type { newDefID := blockIDs[n.TokensStr()] if "" != newDefID { - n.Tokens = gulu.Str.ToBytes(newDefID) + n.Tokens = []byte(newDefID) } else { logging.LogWarnf("not found def [" + n.TokensStr() + "]") } @@ -486,7 +486,7 @@ func ImportFromLocalPath(boxID, localPath string, toPath string) (err error) { } else { name = existName } - n.Tokens = gulu.Str.ToBytes("assets/" + name) + n.Tokens = []byte("assets/" + name) } return ast.WalkContinue }) @@ -570,7 +570,7 @@ func ImportFromLocalPath(boxID, localPath string, toPath string) (err error) { logging.LogErrorf("copy asset from [%s] to [%s] failed: %s", absolutePath, assetTargetPath, err) return ast.WalkContinue } - n.Tokens = gulu.Str.ToBytes("assets/" + name) + n.Tokens = []byte("assets/" + name) } return ast.WalkContinue })