mirror of
https://github.com/mjl-/mox.git
synced 2025-07-12 11:04:38 +03:00
update to golang.org/x/net/html (slow parsing fixed) and other golang.org/x deps
This commit is contained in:
7
vendor/golang.org/x/net/html/doc.go
generated
vendored
7
vendor/golang.org/x/net/html/doc.go
generated
vendored
@ -78,16 +78,11 @@ example, to process each anchor node in depth-first order:
|
||||
if err != nil {
|
||||
// ...
|
||||
}
|
||||
var f func(*html.Node)
|
||||
f = func(n *html.Node) {
|
||||
for n := range doc.Descendants() {
|
||||
if n.Type == html.ElementNode && n.Data == "a" {
|
||||
// Do something with n...
|
||||
}
|
||||
for c := n.FirstChild; c != nil; c = c.NextSibling {
|
||||
f(c)
|
||||
}
|
||||
}
|
||||
f(doc)
|
||||
|
||||
The relevant specifications include:
|
||||
https://html.spec.whatwg.org/multipage/syntax.html and
|
||||
|
Reference in New Issue
Block a user