Skip to content

Commit

Permalink
fix extra line on diff
Browse files Browse the repository at this point in the history
  • Loading branch information
whackashoe committed Jan 2, 2017
1 parent f8e5d61 commit fc888c3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/controllers/PasteController.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ public function diff($slug, $modslug)
}

$diff = (new Differ)->diff($paste->code, $mod->code);
$diff_lines = array_slice(explode("\n", $diff), 3);
$diff_exploded = explode("\n", $diff);
$diff_lines = array_slice($diff_exploded, 3, count($diff_exploded) - 4);
$diff_line_list = [];
foreach($diff_lines as &$line) {
$diff_line_list[] = substr($line, 0, 1);
Expand Down

0 comments on commit fc888c3

Please sign in to comment.