diff --git a/src/GitList/Git/Repository.php b/src/GitList/Git/Repository.php index 08787c8..4b21e91 100644 --- a/src/GitList/Git/Repository.php +++ b/src/GitList/Git/Repository.php @@ -169,9 +169,9 @@ class Repository extends BaseRepository switch ($log[0]) { case "@": // Set the line numbers - preg_match('/@@ -([0-9]+)/', $log, $matches); + preg_match('/@@ -([0-9]+),[0-9]+ \+([0-9]+)/', $log, $matches); $lineNumOld = $matches[1] - 1; - $lineNumNew = $matches[1] - 1; + $lineNumNew = $matches[2] - 1; break; case "-": $lineNumOld++; diff --git a/themes/bootstrap3/twig/commit.twig b/themes/bootstrap3/twig/commit.twig index c4386e1..15955f2 100644 --- a/themes/bootstrap3/twig/commit.twig +++ b/themes/bootstrap3/twig/commit.twig @@ -46,7 +46,7 @@ {% if line.getType != 'chunk' %} - + {% endif %} {{ line.getNumOld }} {% if line.getType != 'chunk' %} diff --git a/themes/default/twig/commit.twig b/themes/default/twig/commit.twig index 3a4ce11..ed67964 100644 --- a/themes/default/twig/commit.twig +++ b/themes/default/twig/commit.twig @@ -45,7 +45,7 @@ {% if line.getType != 'chunk' %} - + {% endif %} {{ line.getNumOld }} {% if line.getType != 'chunk' %}