mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-11 07:02:33 +01:00
🎨 The old version of the application no longer supports opening the new version of the document https://github.com/siyuan-note/siyuan/issues/16505
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
parent
9e075581ff
commit
b5c84f2354
21 changed files with 114 additions and 41 deletions
|
|
@ -23,6 +23,7 @@ import (
|
|||
"github.com/88250/lute/editor"
|
||||
"github.com/88250/lute/render"
|
||||
"github.com/siyuan-note/logging"
|
||||
"github.com/siyuan-note/siyuan/kernel/treenode"
|
||||
"github.com/siyuan-note/siyuan/kernel/util"
|
||||
)
|
||||
|
||||
|
|
@ -63,13 +64,13 @@ func AutoSpace(rootID string) (err error) {
|
|||
formatRenderer := render.NewFormatRenderer(tree, luteEngine.RenderOptions)
|
||||
md := formatRenderer.Render()
|
||||
newTree := parseKTree(md)
|
||||
newTree.Root.Spec = "1"
|
||||
newTree.Root.Spec = treenode.CurrentSpec
|
||||
// 第二次格式化启用自动空格
|
||||
luteEngine.SetAutoSpace(true)
|
||||
formatRenderer = render.NewFormatRenderer(newTree, luteEngine.RenderOptions)
|
||||
md = formatRenderer.Render()
|
||||
newTree = parseKTree(md)
|
||||
newTree.Root.Spec = "1"
|
||||
newTree.Root.Spec = treenode.CurrentSpec
|
||||
newTree.Root.ID = tree.ID
|
||||
newTree.Root.KramdownIAL = rootIAL
|
||||
newTree.ID = tree.ID
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue