Skip to content

Commit 4e74cc5

Browse files
committed
Fix SideBySide renderer fatal error
Trigger: old: ``` hello ``` new: ``` hello test. insert a new line. ``` Signed-off-by: Jack Cherng <[email protected]>
1 parent fa71652 commit 4e74cc5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Renderer/Html/SideBySide.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ protected function renderTableReplace(array $change): string
196196
$newLineNum = $change['old']['offset'] + $no + 1;
197197
$newLine = '<span>' . $change['new']['lines'][$no] . '</span>';
198198
} else {
199-
$newLineNum = '';
199+
$newLineNum = null;
200200
$newLine = '';
201201
}
202202

@@ -216,7 +216,7 @@ protected function renderTableReplace(array $change): string
216216
$oldLineNum = $change['old']['offset'] + $no + 1;
217217
$oldLine = '<span>' . $change['old']['lines'][$no] . '</span>';
218218
} else {
219-
$oldLineNum = '';
219+
$oldLineNum = null;
220220
$oldLine = '';
221221
}
222222

0 commit comments

Comments
 (0)