File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -353,11 +353,20 @@ private function performOperation($operation)
353353
354354 private function processReplaceOperation ($ operation )
355355 {
356- $ this ->processDeleteOperation ( $ operation , "diffmod " );
357- if ($ this ->insertSpaceInReplace ) {
356+ $ processDelete = strlen ($ this ->oldText ) > 0 ;
357+ $ processInsert = strlen ($ this ->newText ) > 0 ;
358+
359+ if ($ processDelete ) {
360+ $ this ->processDeleteOperation ( $ operation , "diffmod " );
361+ }
362+
363+ if ($ this ->insertSpaceInReplace && $ processDelete && $ processInsert ) {
358364 $ this ->content .= ' ' ;
359365 }
360- $ this ->processInsertOperation ( $ operation , "diffmod " );
366+
367+ if ($ processInsert ) {
368+ $ this ->processInsertOperation ( $ operation , "diffmod " );
369+ }
361370 }
362371
363372 private function processInsertOperation ($ operation , $ cssClass )
You can’t perform that action at this time.
0 commit comments