@@ 9140-9145 (lines=6) @@ | ||
9137 | $replacementSelector->elements[0]->currentFileInfo |
|
9138 | ); |
|
9139 | ||
9140 | if( $match['pathIndex'] > $currentSelectorPathIndex && $currentSelectorPathElementIndex > 0 ){ |
|
9141 | $last_path = end($path); |
|
9142 | $last_path->elements = array_merge( $last_path->elements, array_slice( $selectorPath[$currentSelectorPathIndex]->elements, $currentSelectorPathElementIndex)); |
|
9143 | $currentSelectorPathElementIndex = 0; |
|
9144 | $currentSelectorPathIndex++; |
|
9145 | } |
|
9146 | ||
9147 | $newElements = array_merge( |
|
9148 | array_slice($selector->elements, $currentSelectorPathElementIndex, ($match['index'] - $currentSelectorPathElementIndex) ) // last parameter of array_slice is different than the last parameter of javascript's slice |
|
@@ 9169-9173 (lines=5) @@ | ||
9166 | } |
|
9167 | } |
|
9168 | ||
9169 | if( $currentSelectorPathIndex < $selectorPath_len && $currentSelectorPathElementIndex > 0 ){ |
|
9170 | $last_path = end($path); |
|
9171 | $last_path->elements = array_merge( $last_path->elements, array_slice($selectorPath[$currentSelectorPathIndex]->elements, $currentSelectorPathElementIndex)); |
|
9172 | $currentSelectorPathIndex++; |
|
9173 | } |
|
9174 | ||
9175 | $slice_len = $selectorPath_len - $currentSelectorPathIndex; |
|
9176 | $path = array_merge($path, array_slice($selectorPath, $currentSelectorPathIndex, $slice_len)); |