serpapi / nokolexbor

High-performance HTML5 parser for Ruby based on Lexbor, with support for both CSS selectors and XPath.
218 stars 4 forks source link

Fragments return element_children.first but not first_element_child #7

Closed jaredcwhite closed 1 year ago

jaredcwhite commented 1 year ago

It seems that a document fragment will return element children as expected via element_children, and then of course you can call .first, but calling first_element_child will return nil.

zyc9012 commented 1 year ago

Thanks @jaredcwhite! Fixed by c33b9e13ab09695fa088613ce6583dfe698152a8. If it's not urgent, I will release a new version with more future fixes.

jaredcwhite commented 1 year ago

@zyc9012 Certainly not urgent. Thanks!

jaredcwhite commented 1 year ago

Working well now!