mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-28 12:28:48 +01:00
🐛 建立索引时无法解析 v2.2.0- 版本的块引用 Fix https://github.com/siyuan-note/siyuan/issues/6889
This commit is contained in:
parent
3943a5f024
commit
b293571cb5
6 changed files with 11 additions and 18 deletions
|
|
@ -155,7 +155,7 @@ func prepareWriteTree(tree *parse.Tree) (data []byte, filePath string, err error
|
|||
|
||||
filePath = filepath.Join(util.DataDir, tree.Box, tree.Path)
|
||||
if oldSpec := tree.Root.Spec; "" == oldSpec {
|
||||
luteEngine.NestedInlines2FlattedSpans(tree)
|
||||
parse.NestedInlines2FlattedSpans(tree)
|
||||
tree.Root.Spec = "1"
|
||||
logging.LogInfof("migrated tree [%s] from spec [%s] to [%s]", filePath, oldSpec, tree.Root.Spec)
|
||||
}
|
||||
|
|
@ -236,7 +236,7 @@ func parseJSON2Tree(boxID, p string, jsonData []byte, luteEngine *lute.Lute) (re
|
|||
|
||||
filePath := filepath.Join(util.DataDir, ret.Box, ret.Path)
|
||||
if oldSpec := ret.Root.Spec; "" == oldSpec {
|
||||
luteEngine.NestedInlines2FlattedSpans(ret)
|
||||
parse.NestedInlines2FlattedSpans(ret)
|
||||
ret.Root.Spec = "1"
|
||||
needFix = true
|
||||
logging.LogInfof("migrated tree [%s] from spec [%s] to [%s]", filePath, oldSpec, ret.Root.Spec)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue