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)
353
353
354
354
private function processReplaceOperation ($ operation )
355
355
{
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 ) {
358
364
$ this ->content .= ' ' ;
359
365
}
360
- $ this ->processInsertOperation ( $ operation , "diffmod " );
366
+
367
+ if ($ processInsert ) {
368
+ $ this ->processInsertOperation ( $ operation , "diffmod " );
369
+ }
361
370
}
362
371
363
372
private function processInsertOperation ($ operation , $ cssClass )
You can’t perform that action at this time.
0 commit comments