mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 遗留的 Markdown 嵌套节点迁移为平铺的文本标记节点
This commit is contained in:
parent
6851656c09
commit
7ede0cbf52
3 changed files with 6 additions and 97 deletions
|
|
@ -105,7 +105,7 @@ func WriteTree(tree *parse.Tree) (err error) {
|
|||
|
||||
filePath := filepath.Join(util.DataDir, tree.Box, tree.Path)
|
||||
if oldSpec := tree.Root.Spec; "" == oldSpec {
|
||||
treenode.NestedInlines2FlattedSpans(tree)
|
||||
luteEngine.NestedInlines2FlattedSpans(tree)
|
||||
tree.Root.Spec = "1"
|
||||
logging.LogInfof("migrated tree [%s] from spec [%s] to [%s]", filePath, oldSpec, tree.Root.Spec)
|
||||
}
|
||||
|
|
@ -190,7 +190,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 {
|
||||
treenode.NestedInlines2FlattedSpans(ret)
|
||||
luteEngine.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