(h string, context *html.Node, opts []html.ParseOption)
| 575 | } |
| 576 | |
| 577 | func parseHtmlWithContext(h string, context *html.Node, opts []html.ParseOption) []*html.Node { |
| 578 | // Errors are only returned when the io.Reader returns any error besides |
| 579 | // EOF, but strings.Reader never will |
| 580 | nodes, err := html.ParseFragmentWithOptions(strings.NewReader(h), context, opts...) |
| 581 | if err != nil { |
| 582 | panic("goquery: failed to parse HTML: " + err.Error()) |
| 583 | } |
| 584 | return nodes |
| 585 | } |
| 586 | |
| 587 | // Get the first child that is an ElementNode |
| 588 | func getFirstChildEl(n *html.Node) *html.Node { |
no outgoing calls
no test coverage detected