This commit is contained in:
Daniel 2024-07-06 10:03:22 +08:00
parent 8c36764686
commit 7aa0776cd5
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -45,6 +45,9 @@ func NodeHash(node *ast.Node, tree *parse.Tree, luteEngine *lute.Lute) string {
}
hpath := tree.HPath
data := tree.Box + tree.Path + hpath + string(ial) + md
if nil != node.Parent {
data += node.Parent.ID
}
return fmt.Sprintf("%x", sha256.Sum256(gulu.Str.ToBytes(data)))[:7]
}