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)
| 266 | // |
| 267 | // This follows the same rules as Selection.Append. |
| 268 | func (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. |
no test coverage detected