mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-03 07:18:49 +01:00
♻️ Move .sy data parser to https://github.com/siyuan-note/dataparser
This commit is contained in:
parent
3caeeaf29d
commit
bf465e5bbf
9 changed files with 16 additions and 324 deletions
|
|
@ -45,6 +45,7 @@ import (
|
|||
"github.com/88250/lute/parse"
|
||||
"github.com/88250/lute/render"
|
||||
"github.com/emirpasic/gods/sets/hashset"
|
||||
"github.com/siyuan-note/dataparser"
|
||||
"github.com/siyuan-note/dejavu"
|
||||
"github.com/siyuan-note/dejavu/cloud"
|
||||
"github.com/siyuan-note/dejavu/entity"
|
||||
|
|
@ -53,7 +54,6 @@ import (
|
|||
"github.com/siyuan-note/httpclient"
|
||||
"github.com/siyuan-note/logging"
|
||||
"github.com/siyuan-note/siyuan/kernel/conf"
|
||||
"github.com/siyuan-note/siyuan/kernel/filesys"
|
||||
"github.com/siyuan-note/siyuan/kernel/task"
|
||||
"github.com/siyuan-note/siyuan/kernel/treenode"
|
||||
"github.com/siyuan-note/siyuan/kernel/util"
|
||||
|
|
@ -425,7 +425,7 @@ func parseTitleInSnapshot(fileID string, repo *dejavu.Repo, luteEngine *lute.Lut
|
|||
}
|
||||
|
||||
var tree *parse.Tree
|
||||
tree, err = filesys.ParseJSONWithoutFix(data, luteEngine.ParseOptions)
|
||||
tree, err = dataparser.ParseJSONWithoutFix(data, luteEngine.ParseOptions)
|
||||
if err != nil {
|
||||
logging.LogErrorf("parse file [%s] failed: %s", fileID, err)
|
||||
return
|
||||
|
|
@ -438,7 +438,7 @@ func parseTitleInSnapshot(fileID string, repo *dejavu.Repo, luteEngine *lute.Lut
|
|||
|
||||
func parseTreeInSnapshot(data []byte, luteEngine *lute.Lute) (isLargeDoc bool, tree *parse.Tree, err error) {
|
||||
isLargeDoc = 1024*1024*1 <= len(data)
|
||||
tree, err = filesys.ParseJSONWithoutFix(data, luteEngine.ParseOptions)
|
||||
tree, err = dataparser.ParseJSONWithoutFix(data, luteEngine.ParseOptions)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue