mirror of
https://github.com/PuerkitoBio/goquery.git
synced 2026-10-20 00:16:32 +00:00
Merge pull request #583 from jvoisin/nocon
cleanup: drop redundant FirstChild nil-check in textHelper
This commit is contained in:
+2
-4
@@ -71,10 +71,8 @@ func (s *Selection) textHelper(n *html.Node, builder *strings.Builder) {
|
||||
// Keep newlines and spaces, like jQuery
|
||||
builder.WriteString(n.Data)
|
||||
}
|
||||
if n.FirstChild != nil {
|
||||
for c := n.FirstChild; c != nil; c = c.NextSibling {
|
||||
s.textHelper(c, builder)
|
||||
}
|
||||
for c := n.FirstChild; c != nil; c = c.NextSibling {
|
||||
s.textHelper(c, builder)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user