Skip to content

Commit

Permalink
fix(doc): update docs for accurate representation of function
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonygedeon committed Oct 25, 2021
1 parent 11e1233 commit d35d4ce
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions utilities.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,13 @@ func nodeName(node *html.Node) string {
}

// Render renders the html of the first element from selector and writes it to the writer.
// It behaves similar to OuterHtml but takes io.Writer as input.
// // It behaves the same as OuterHtml but writes to w instead of returning the string.
func Render(w io.Writer, s *Selection) error {
if s.Length() == 0 {
return nil
}
n := s.Get(0)
if err := html.Render(w, n); err != nil {
return err
}
return nil
return html.Render(w, n)
}

// OuterHtml returns the outer HTML rendering of the first item in
Expand Down

0 comments on commit d35d4ce

Please sign in to comment.