mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-02-28 05:32:52 +00:00
🎨 Clean code
This commit is contained in:
@@ -33,17 +33,6 @@ import (
|
||||
"github.com/siyuan-note/siyuan/kernel/util"
|
||||
)
|
||||
|
||||
func StatTree(tree *parse.Tree) (ret *util.BlockStatResult) {
|
||||
runeCnt, wordCnt, linkCnt, imgCnt, refCnt := tree.Root.Stat()
|
||||
return &util.BlockStatResult{
|
||||
RuneCount: runeCnt,
|
||||
WordCount: wordCnt,
|
||||
LinkCount: linkCnt,
|
||||
ImageCount: imgCnt,
|
||||
RefCount: refCnt,
|
||||
}
|
||||
}
|
||||
|
||||
func NodeHash(node *ast.Node, tree *parse.Tree, luteEngine *lute.Lute) string {
|
||||
ialArray := node.KramdownIAL
|
||||
sort.Slice(ialArray, func(i, j int) bool {
|
||||
|
||||
Reference in New Issue
Block a user