aanand / deadweight

NOT MAINTAINED
MIT License
1.19k stars 52 forks source link

pseudo selectors :nth-child(x) and so on #18

Closed kocur4d closed 12 years ago

kocur4d commented 12 years ago

I have a problem with nth-child(x) pseudo selector

Nokogiri is complaining about Invalid expresion:

nokogiri/xml/node.rb:159:in `evaluate': Invalid expression: //[@id = 'main']//[@id = 'goals']//p(., 2) (Nokogiri::XML::XPath::SyntaxError)

its all have to do with regular expression in strip method.

Why this can't be merged in?? Support more CSS3/CSS4 selectors

or if you are not happy about /:.*/ reg exp maybe something more relaxed like: /::?[\w-]+(([1-9]+))?/ just for nth-child brackets and number??

aanand commented 12 years ago

Negligence on my part - I'll merge in #15 later today.