MCPcopy
hub / github.com/PuerkitoBio/goquery / ReplaceWithMatcher

Method ReplaceWithMatcher

manipulation.go:268–270  ·  view source on GitHub ↗

ReplaceWithMatcher replaces each element in the set of matched elements with the nodes matched by the given Matcher. It returns the removed elements. This follows the same rules as Selection.Append.

(m Matcher)

Source from the content-addressed store, hash-verified

266//
267// This follows the same rules as Selection.Append.
268func (s *Selection) ReplaceWithMatcher(m Matcher) *Selection {
269 return s.ReplaceWithNodes(m.MatchAll(s.document.rootNode)...)
270}
271
272// ReplaceWithSelection replaces each element in the set of matched elements with
273// the nodes from the given Selection.

Callers 1

ReplaceWithMethod · 0.95

Calls 2

ReplaceWithNodesMethod · 0.95
MatchAllMethod · 0.65

Tested by

no test coverage detected