| @@ 479-487 (lines=9) @@ | ||
| 476 | } else if ($c == '~') { |
|
| 477 | $spaceAllowed = true; |
|
| 478 | $tmp .= $query[$i++]; |
|
| 479 | while (isset($query[$i]) |
|
| 480 | && ($this->isChar($query[$i]) || in_array($query[$i], $classChars) |
|
| 481 | || $query[$i] == '*' || ($query[$i] == ' ' && $spaceAllowed))) { |
|
| 482 | if ($query[$i] != ' ') { |
|
| 483 | $spaceAllowed = false; |
|
| 484 | } |
|
| 485 | $tmp .= $query[$i]; |
|
| 486 | $i++; |
|
| 487 | } |
|
| 488 | $return[] = $tmp; |
|
| 489 | // + Adjacent sibling selectors |
|
| 490 | } else { |
|
| @@ 494-502 (lines=9) @@ | ||
| 491 | if ($c == '+') { |
|
| 492 | $spaceAllowed = true; |
|
| 493 | $tmp .= $query[$i++]; |
|
| 494 | while (isset($query[$i]) |
|
| 495 | && ($this->isChar($query[$i]) || in_array($query[$i], $classChars) |
|
| 496 | || $query[$i] == '*' || ($spaceAllowed && $query[$i] == ' '))) { |
|
| 497 | if ($query[$i] != ' ') { |
|
| 498 | $spaceAllowed = false; |
|
| 499 | } |
|
| 500 | $tmp .= $query[$i]; |
|
| 501 | $i++; |
|
| 502 | } |
|
| 503 | $return[] = $tmp; |
|
| 504 | // ATTRS |
|
| 505 | } else { |
|