protected function expandParentSelectors(&$tag, $replace)
{
$parts = explode("\$&\$", $tag);
$count = 0;
foreach ($parts as &$part) {
$part = str_replace($this->parentSelector, $replace, $part, $c);
$count += $c;
}
$tag = implode($this->parentSelector, $parts);
return $count;
}