MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / finalizeStack

Function finalizeStack

pkg/vdom/vdom_html.go:59–74  ·  view source on GitHub ↗
(stack []*VDomElem)

Source from the content-addressed store, hash-verified

57}
58
59func finalizeStack(stack []*VDomElem) *VDomElem {
60 if len(stack) == 0 {
61 return nil
62 }
63 for len(stack) > 1 {
64 stack = popElemStack(stack)
65 }
66 rtnElem := stack[0]
67 if len(rtnElem.Children) == 0 {
68 return nil
69 }
70 if len(rtnElem.Children) == 1 {
71 return &rtnElem.Children[0]
72 }
73 return rtnElem
74}
75
76// returns value, isjson
77func getAttrString(token htmltoken.Token, key string) string {

Callers 1

BindFunction · 0.85

Calls 1

popElemStackFunction · 0.85

Tested by

no test coverage detected