File tree Expand file tree Collapse file tree 1 file changed +6
-11
lines changed
Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -204,25 +204,20 @@ protected function processEqualOperation($operation)
204204 {
205205 $ result = array ();
206206 foreach ($ this ->newWords as $ pos => $ s ) {
207- $ matchFound = false ;
208207 if ($ pos >= $ operation ->startInNew && $ pos < $ operation ->endInNew ) {
209- foreach ($ this ->isolatedDiffTags as $ isolatedDiffTag ) {
210- if ($ s === $ isolatedDiffTag && isset ($ this ->newIsolatedDiffTags [$ pos ]) && $ matchFound === false ) {
211- $ oldText = implode ("" , $ this ->findMatchingScriptsInOld ($ operation , $ pos ));
212- $ newText = implode ("" , $ this ->newIsolatedDiffTags [$ pos ]);
213- $ result [] = $ this ->diffElements ($ oldText , $ newText );
214- $ matchFound = true ;
215- }
216- }
217- if ($ matchFound === false ){
208+ if (in_array ($ s , $ this ->isolatedDiffTags ) && isset ($ this ->newIsolatedDiffTags [$ pos ])) {
209+ $ oldText = implode ("" , $ this ->findIsolatedDiffTagsInOld ($ operation , $ pos ));
210+ $ newText = implode ("" , $ this ->newIsolatedDiffTags [$ pos ]);
211+ $ result [] = $ this ->diffElements ($ oldText , $ newText );
212+ } else {
218213 $ result [] = $ s ;
219214 }
220215 }
221216 }
222217 $ this ->content .= implode ( "" , $ result );
223218 }
224219
225- private function findMatchingScriptsInOld ($ operation , $ posInNew )
220+ private function findIsolatedDiffTagsInOld ($ operation , $ posInNew )
226221 {
227222 $ offset = $ posInNew - $ operation ->startInNew ;
228223
You can’t perform that action at this time.
0 commit comments