@@ 9148-9153 (lines=6) @@ | ||
9145 | $replacementSelector->elements[0]->currentFileInfo |
|
9146 | ); |
|
9147 | ||
9148 | if( $match['pathIndex'] > $currentSelectorPathIndex && $currentSelectorPathElementIndex > 0 ){ |
|
9149 | $last_path = end($path); |
|
9150 | $last_path->elements = array_merge( $last_path->elements, array_slice( $selectorPath[$currentSelectorPathIndex]->elements, $currentSelectorPathElementIndex)); |
|
9151 | $currentSelectorPathElementIndex = 0; |
|
9152 | $currentSelectorPathIndex++; |
|
9153 | } |
|
9154 | ||
9155 | $newElements = array_merge( |
|
9156 | array_slice($selector->elements, $currentSelectorPathElementIndex, ($match['index'] - $currentSelectorPathElementIndex) ) // last parameter of array_slice is different than the last parameter of javascript's slice |
|
@@ 9177-9181 (lines=5) @@ | ||
9174 | } |
|
9175 | } |
|
9176 | ||
9177 | if( $currentSelectorPathIndex < $selectorPath_len && $currentSelectorPathElementIndex > 0 ){ |
|
9178 | $last_path = end($path); |
|
9179 | $last_path->elements = array_merge( $last_path->elements, array_slice($selectorPath[$currentSelectorPathIndex]->elements, $currentSelectorPathElementIndex)); |
|
9180 | $currentSelectorPathIndex++; |
|
9181 | } |
|
9182 | ||
9183 | $slice_len = $selectorPath_len - $currentSelectorPathIndex; |
|
9184 | $path = array_merge($path, array_slice($selectorPath, $currentSelectorPathIndex, $slice_len)); |