Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
b9cea53c27c4
Commit
8f52501e
authored
Jun 12, 2013
by
Dmitriy Zaporozhets
Browse files
Fix inline diff issue. See #3150
parent
9885ea1e130f
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/controllers/commit_controller.rb
View file @
b9cea53c
...
...
@@ -11,7 +11,7 @@ def show
result
=
CommitLoadContext
.
new
(
project
,
current_user
,
params
).
execute
@commit
=
result
[
:commit
]
if
@commit
.
nil?
git_not_found!
return
...
...
lib/gitlab/inline_diff.rb
View file @
b9cea53c
...
...
@@ -21,8 +21,9 @@ def processing diff_arr
end
end
first_token
=
first_line
[
0
..
first_the_same_symbols
][
1
..-
1
]
diff_arr
[
index
+
1
].
sub!
(
first_token
,
first_token
+
START
)
diff_arr
[
index
+
2
].
sub!
(
first_token
,
first_token
+
START
)
start
=
first_token
+
START
diff_arr
[
index
+
1
].
sub!
(
first_token
,
first_token
=>
start
)
diff_arr
[
index
+
2
].
sub!
(
first_token
,
first_token
=>
start
)
last_the_same_symbols
=
0
(
1
..
max_length
+
1
).
each
do
|
i
|
last_the_same_symbols
=
-
i
...
...
@@ -60,8 +61,6 @@ def replace_markers line
line
.
gsub!
(
FINISH
,
"</span>"
)
line
end
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment