Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
d51ebb7e
Commit
d51ebb7e
authored
Jul 22, 2015
by
Stan Hu
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #9472 from Leibniz137/indent_unfolded_code_1_char
Gitlab Issue 707: Indent unfolded code 1 character
parents
39dc39e3
dbff6bc1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
1 deletion
+6
-1
app/assets/javascripts/diff.js.coffee
app/assets/javascripts/diff.js.coffee
+4
-0
app/views/projects/blob/diff.html.haml
app/views/projects/blob/diff.html.haml
+1
-1
lib/unfold_form.rb
lib/unfold_form.rb
+1
-0
No files found.
app/assets/javascripts/diff.js.coffee
View file @
d51ebb7e
...
...
@@ -31,6 +31,10 @@ class @Diff
bottom
:
unfoldBottom
offset
:
offset
unfold
:
unfold
# indent is used to compensate for single space indent to fit
# '+' and '-' prepended to diff lines,
# see https://gitlab.com/gitlab-org/gitlab-ce/issues/707
indent
:
1
$
.
get
(
link
,
params
,
(
response
)
=>
target
.
parent
().
replaceWith
(
response
)
...
...
app/views/projects/blob/diff.html.haml
View file @
d51ebb7e
...
...
@@ -11,7 +11,7 @@
%td
.old_line.diff-line-num
{
data:
{
linenumber:
line_old
}}
=
link_to
raw
(
line_old
),
"#"
%td
.new_line
=
link_to
raw
(
line_new
)
,
"#"
%td
.line_content.noteable_line
=
line
%td
.line_content.noteable_line
=
' '
*
@form
.
indent
+
line
-
if
@form
.
unfold?
&&
@form
.
bottom?
&&
@form
.
to
<
@blob
.
loc
%tr
.line_holder
{
id:
@form
.
to
}
...
...
lib/unfold_form.rb
View file @
d51ebb7e
...
...
@@ -8,4 +8,5 @@ class UnfoldForm
attribute
:bottom
,
Boolean
attribute
:unfold
,
Boolean
,
default:
true
attribute
:offset
,
Integer
attribute
:indent
,
Integer
,
default:
0
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