diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-02-26 21:32:16 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-02-26 21:32:16 +0000 |
commit | 77938cc11e2059e323093eca03425c812a7d9cb8 (patch) | |
tree | 0aff0f8d169faea4456be77d203b433f74f69d60 | |
parent | ae998984a0fd08a377ff5e5c4d753792a27ebe43 (diff) | |
download | redmine-77938cc11e2059e323093eca03425c812a7d9cb8.tar.gz redmine-77938cc11e2059e323093eca03425c812a7d9cb8.zip |
fixed: no diff display with one line files [#8883]
git-svn-id: http://redmine.rubyforge.org/svn/trunk@276 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | app/views/repositories/diff.rhtml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/views/repositories/diff.rhtml b/app/views/repositories/diff.rhtml index 0060e7867..febac8ab1 100644 --- a/app/views/repositories/diff.rhtml +++ b/app/views/repositories/diff.rhtml @@ -8,9 +8,9 @@ line_num_l = 0 line_num_r = 0 %>
<% @diff.each do |line| %>
<%
- if line =~ /^@@ (\+|\-)(\d+),\d+ (\+|\-)(\d+),\d+ @@/
+ if line =~ /^@@ (\+|\-)(\d+)(,\d+)? (\+|\-)(\d+)(,\d+)? @@/
line_num_l = $2.to_i
- line_num_r = $4.to_i
+ line_num_r = $5.to_i
if parsing %>
<tr class="spacing"><td colspan="3"> </td></tr>
<% end
|