AfterMatcher applies the matcher from the root document and inserts the matched elements after the elements in the set of matched elements. If one of the matched elements in the selection is not currently in the document, it's impossible to insert nodes after it, so it will be ignored. This follow
(m Matcher)
| 25 | // |
| 26 | // This follows the same rules as Selection.Append. |
| 27 | func (s *Selection) AfterMatcher(m Matcher) *Selection { |
| 28 | return s.AfterNodes(m.MatchAll(s.document.rootNode)...) |
| 29 | } |
| 30 | |
| 31 | // AfterSelection inserts the elements in the selection after each element in the set of matched |
| 32 | // elements. |
no test coverage detected