(ns ...*html.Node)
| 544 | } |
| 545 | |
| 546 | func (s *Selection) wrapInnerNodes(ns ...*html.Node) *Selection { |
| 547 | if len(ns) == 0 { |
| 548 | return s |
| 549 | } |
| 550 | |
| 551 | s.Each(func(i int, s *Selection) { |
| 552 | contents := s.Contents() |
| 553 | |
| 554 | if contents.Size() > 0 { |
| 555 | contents.wrapAllNodes(ns...) |
| 556 | } else { |
| 557 | s.AppendNodes(cloneNode(ns[0])) |
| 558 | } |
| 559 | }) |
| 560 | |
| 561 | return s |
| 562 | } |
| 563 | |
| 564 | func parseHtml(h string) []*html.Node { |
| 565 | // Errors are only returned when the io.Reader returns any error besides |
no test coverage detected