Mon Nov 30 05:04:06 UTC 2009 pix@kepibu.org * Work for spaces between [+-] and B diff -rN -u old-Oh, Ducks!/selectors.lisp new-Oh, Ducks!/selectors.lisp --- old-Oh, Ducks!/selectors.lisp 2015-10-10 17:24:36.000000000 +0000 +++ new-Oh, Ducks!/selectors.lisp 2015-10-10 17:24:36.000000000 +0000 @@ -59,11 +59,12 @@ (list (make-instance 'descendant-combinator :matcher (parse-selector &rest)))) ;; simple selectors ;; cyclic (An+B, n+B) - (#T(regexp$ ":nth-child\\([ ]*([+-]?)([0-9]+)?n[ ]*([+-]?[0-9]+)?[ ]*\\)" (?asign ?a ?b)) + (#T(regexp$ ":nth-child\\([ ]*([+-]?)([0-9]+)?n[ ]*([+-])[ ]*([0-9]+)?[ ]*\\)" (?asign ?a ?bsign ?b)) (cons (make-instance 'nth-child-selector :arg (cons (funcall (if (string= "-" asign) #'- #'+) (if (stringp a) (parse-integer a) 1)) - (if (stringp b) (parse-integer b) 0))) + (funcall (if (string= "-" bsign) #'- #'+) + (if (stringp b) (parse-integer b) 0)))) (parse-selector &rest))) ;; absolute (B) (#T(regexp$ ":nth-child\\([ ]*([+-]?[0-9]+)[ ]*\\)" (?b))