mdevils/css-selector-parser

Wrong output with parent

totty90 opened this issue · 1 comments

var CssSelectorParser = require('css-selector-parser').CssSelectorParser;
var parser = new CssSelectorParser();
var util = require('util');
console.log(util.inspect(parser.parse('.a:hover .b')));

Output:

{ type: 'ruleSet',
  rule:
   { classNames: [ 'a' ],
     pseudos: [ [Object] ],
     type: 'rule',
     rule: { classNames: [Object], nestingOperator: null, type: 'rule' } } }
{ type: 'ruleSet',
  rule:
   { classNames: [ 'a' ],
     pseudos: [ [Object] ],
     type: 'rule',
     rule: { classNames: [Object], nestingOperator: null, type: 'rule' } } }

Shouldn't the 2nd ruleSet have className equal to "b"?

My bad.. the b class in in the first one. This is just duplicated output.