MCPcopy Create free account
hub / github.com/andybalholm/cascadia / nodeText

Function nodeText

pseudo_classes.go:139–143  ·  view source on GitHub ↗

nodeText returns the text contained in n and its descendants.

(n *html.Node)

Source from the content-addressed store, hash-verified

137
138// nodeText returns the text contained in n and its descendants.
139func nodeText(n *html.Node) string {
140 var b bytes.Buffer
141 writeNodeText(n, &b)
142 return b.String()
143}
144
145// nodeOwnText returns the contents of the text nodes that are direct
146// children of n.

Callers 2

MatchMethod · 0.85
MatchMethod · 0.85

Calls 2

writeNodeTextFunction · 0.85
StringMethod · 0.65

Tested by

no test coverage detected