Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

the result don't matches the selector string. #26

Closed
conanca opened this Issue · 2 comments

2 participants

@conanca

e.g.

...
doc.Find("img[src]")
...

< img src="assets/images/gallery/thumb-1.jpg" alt="150x150"/> is ok
< img alt="150x150" src="assets/images/gallery/thumb-1.jpg" /> will not match

@PuerkitoBio
Owner

Hello,

I created a test to try to reproduce the issue (see TestIssue26 in traversal_test.go, last one). I run the Find() call for each img tag individually, and both in the same source, and it all works. The problem may be because of the space between the opening bracket and the tag name, but when I tried this, it failed in all cases, not one out of 2.

Can you reproduce it on your setup, with the provided test? If not, can you give me a minimal test case to reproduce the bug? And you may want to make sure you are on the latest versions of goquery, Cascadia (the selector library) and the go.net subrepo.

Thanks,
Martin

@conanca

Sorry,something wrong in my code,sorry.

@conanca conanca closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.