Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

find-in-text selector does not seem to work when it's the last argument of a child selector #83

Open
ar7hur opened this issue Sep 6, 2023 · 0 comments · May be fixed by #89
Open

find-in-text selector does not seem to work when it's the last argument of a child selector #83

ar7hur opened this issue Sep 6, 2023 · 0 comments · May be fixed by #89

Comments

@ar7hur
Copy link

ar7hur commented Sep 6, 2023

I don't know if it's a bug or if I missed something, but find-in-text selector does not seem to work when it's the last argument of a child selector:

(let [tree (-> "<div><div><span>a</span></div></div>" h/parse h/as-hickory)]
      (hs/select (hs/child 
                  (hs/tag :div)
                  (hs/find-in-text #"a"))
               tree)) ; => []

But it works when adding a dummy and:

(let [tree (-> "<div><div><span class=\"go\">a</span></div></div>" h/parse h/as-hickory)]
      (hs/select (hs/child 
                  (hs/tag :div)
                  (hs/and hs/any (hs/find-in-text #"a"))
               tree)) ; => works
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant