mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 23:20:13 +01:00
🎨 状态栏实时统计文档信息 https://github.com/siyuan-note/siyuan/issues/6036
This commit is contained in:
parent
ae8ce006ba
commit
a772b47287
6 changed files with 36 additions and 11 deletions
|
|
@ -31,6 +31,11 @@ import (
|
|||
"github.com/siyuan-note/siyuan/kernel/util"
|
||||
)
|
||||
|
||||
func TreeStat(tree *parse.Tree) (runeCount, wordCount int) {
|
||||
runeCount, wordCount = tree.Root.ContentLen()
|
||||
return
|
||||
}
|
||||
|
||||
func NodeHash(node *ast.Node, tree *parse.Tree, luteEngine *lute.Lute) string {
|
||||
ialArray := node.KramdownIAL
|
||||
sort.Slice(ialArray, func(i, j int) bool {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue