mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 07:00:12 +01:00
🎨 行级元素支持嵌套和交叉 https://github.com/siyuan-note/siyuan/issues/2911
This commit is contained in:
parent
b06f074f1b
commit
f7520a3f12
6 changed files with 20 additions and 8 deletions
|
|
@ -144,6 +144,10 @@ func ImportSY(zipPath, boxID, toPath string) (err error) {
|
|||
// 写回 .sy
|
||||
for _, tree := range trees {
|
||||
syPath := filepath.Join(unzipRootPath, tree.Path)
|
||||
if "" == tree.Root.Spec {
|
||||
treenode.NestedInlines2FlattedSpans(tree)
|
||||
tree.Root.Spec = "1"
|
||||
}
|
||||
renderer := render.NewJSONRenderer(tree, luteEngine.RenderOptions)
|
||||
data := renderer.Render()
|
||||
|
||||
|
|
@ -451,6 +455,7 @@ func ImportFromLocalPath(boxID, localPath string, toPath string) (err error) {
|
|||
tree.Path = targetPath
|
||||
targetPaths[curRelPath] = targetPath
|
||||
tree.HPath = hPath
|
||||
tree.Root.Spec = "1"
|
||||
treenode.NestedInlines2FlattedSpans(tree)
|
||||
|
||||
docDirLocalPath := filepath.Dir(filepath.Join(boxLocalPath, targetPath))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue