mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-19 14:56:09 +01:00
⚡ 改进重命名资源文件性能 https://github.com/siyuan-note/siyuan/issues/7322
改进建立引用索引 https://github.com/siyuan-note/siyuan/issues/7320
This commit is contained in:
parent
6743b21193
commit
b6ea32462e
23 changed files with 155 additions and 132 deletions
|
|
@ -53,7 +53,7 @@ import (
|
|||
|
||||
func HTML2Markdown(htmlStr string) (markdown string, err error) {
|
||||
assetDirPath := filepath.Join(util.DataDir, "assets")
|
||||
luteEngine := NewLute()
|
||||
luteEngine := util.NewLute()
|
||||
luteEngine.SetProtyleWYSIWYG(false)
|
||||
tree := luteEngine.HTML2Tree(htmlStr)
|
||||
ast.Walk(tree.Root, func(n *ast.Node, entering bool) ast.WalkStatus {
|
||||
|
|
@ -387,7 +387,7 @@ func ImportSY(zipPath, boxID, toPath string) (err error) {
|
|||
absPath := filepath.Join(targetDir, treePath)
|
||||
p := strings.TrimPrefix(absPath, boxAbsPath)
|
||||
p = filepath.ToSlash(p)
|
||||
tree, err := LoadTree(boxID, p)
|
||||
tree, err := filesys.LoadTree(boxID, p, luteEngine)
|
||||
if nil != err {
|
||||
logging.LogErrorf("load tree [%s] failed: %s", treePath, err)
|
||||
continue
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue