🎨 Clean code

This commit is contained in:
Daniel 2024-04-07 11:32:27 +08:00
parent 7c0a0ced9f
commit c3d2a7b542
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -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 {