mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-09 04:36:11 +10:00
Gitlab Issue 707: Indent unfolded code 1 character
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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 }
|
||||
|
||||
@@ -8,4 +8,5 @@ class UnfoldForm
|
||||
attribute :bottom, Boolean
|
||||
attribute :unfold, Boolean, default: true
|
||||
attribute :offset, Integer
|
||||
attribute :indent, Integer, default: 0
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user