-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
invalidThis doesn't seem rightThis doesn't seem right
Description
The ~ selector is not working as expected.
I'm trying to extract only the blocks that appear before the .more-news element. This works in the browser but doesn't behave as expected in my code.
Environment
- OS: MacOS Ventura 13.5
- Ruby version: 2.7.8
- Nokolexbor version: 0.5.4
Additional context
test_string = <<-STR
<div>
<div class="newscard position1"></div>
<div class="newscard position2"></div>
<div class="more-news"></div>
<div class="newscard position3"></div>
<div class="newscard position4"></div>
<div>
STR
require 'nokolexbor'
doc = Nokolexbor::HTML(test_string)
doc.css(".newscard:not(.more-news ~ .newscard)").count # => 4 (should be 2)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
invalidThis doesn't seem rightThis doesn't seem right

