In jQuery, it's convenient to try looking for a node that follows another by doing:
The above example is contrived, but it's just an illustration
It would be nice if nokogiri also supported +sibling notation on the current node.
**Update:* Nokogiri should also support .css(">abc") as well, and it'd probably be the same fix, so I'm adding it to this bug.*
From a naive approach, it seems like interpreting +xyz and +abc as if there's a * in front seems to work for NodeSets. My current workaround is to append * in front, like this: nodeset.css(*+xyz).
Actually, the above approach of prepending a * was indeed too naive. It returns matches not only relative to the nodes in the nodeset, but relative to all descendant nodes. For now, I can't think of a workaround.
We'd like to support as much JQuery syntax extensions as we reasonably can. Can you attach a test case that illustrates how this feature should work? That would save Team Nokogiri some time.
I submitted pull request #623.
How do you submit a pull request for an existing GitHub issue?
@flavorjones Sorry, should have been clearer. The test cases are in pull request #623, as well as the fix.
@dlee - Awesome, thanks. Probably won't be merged in for 1.5.1, but the next version.
@flavorjones Cool. What's the schedule for 1.5.1 and 1.5.2?
1.5.1 is imminent. After that, we're not sure. Certainly not seven months again. ;)
I see that 1.5.3 is at rc3. Will the pull request make it for that release?
Apologies ... I will spend some time today on your pull request. Thanks for keeping on top of us!
@flavorjones any updates?
#623 has been merged! I'll put together an RC in the next day or so.
Thanks so much!
Sweet! When does this issue get closed?