BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
5eee4775
Commit
5eee4775
authored
Mar 08, 2017
by
Bob Van Landuyt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correctly indent quotes in new issue description
By using `>`-quote style instead of `>>>`. Also: Update documentation images.
parent
52c0195d
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
5 deletions
+6
-5
build_service.rb
app/services/issues/build_service.rb
+2
-1
preview_issue_for_discussion.png
...oject/merge_requests/img/preview_issue_for_discussion.png
+0
-0
preview_issue_for_discussions.png
...ject/merge_requests/img/preview_issue_for_discussions.png
+0
-0
build_service_spec.rb
spec/services/issues/build_service_spec.rb
+4
-4
No files found.
app/services/issues/build_service.rb
View file @
5eee4775
...
@@ -43,7 +43,8 @@ module Issues
...
@@ -43,7 +43,8 @@ module Issues
discussion_info
<<
" (+
#{
other_note_count
}
#{
'comment'
.
pluralize
(
other_note_count
)
}
)"
if
other_note_count
>
0
discussion_info
<<
" (+
#{
other_note_count
}
#{
'comment'
.
pluralize
(
other_note_count
)
}
)"
if
other_note_count
>
0
note_without_block_quotes
=
Banzai
::
Filter
::
BlockquoteFenceFilter
.
new
(
first_note
.
note
).
call
note_without_block_quotes
=
Banzai
::
Filter
::
BlockquoteFenceFilter
.
new
(
first_note
.
note
).
call
quote
=
">>>
\n
#{
note_without_block_quotes
}
\n
>>>"
spaces
=
' '
*
4
quote
=
note_without_block_quotes
.
lines
.
map
{
|
line
|
"
#{
spaces
}
>
#{
line
}
"
}.
join
[
discussion_info
,
quote
].
join
(
"
\n\n
"
)
[
discussion_info
,
quote
].
join
(
"
\n\n
"
)
end
end
...
...
doc/user/project/merge_requests/img/preview_issue_for_discussion.png
View replaced file @
52c0195d
View file @
5eee4775
172 KB
|
W:
|
H:
210 KB
|
W:
|
H:
2-up
Swipe
Onion skin
doc/user/project/merge_requests/img/preview_issue_for_discussions.png
View replaced file @
52c0195d
View file @
5eee4775
174 KB
|
W:
|
H:
140 KB
|
W:
|
H:
2-up
Swipe
Onion skin
spec/services/issues/build_service_spec.rb
View file @
5eee4775
...
@@ -57,11 +57,11 @@ describe Issues::BuildService, services: true do
...
@@ -57,11 +57,11 @@ describe Issues::BuildService, services: true do
"with a blockquote
\n
"
\
"with a blockquote
\n
"
\
"> That has a quote
\n
"
\
"> That has a quote
\n
"
\
">>>
\n
"
">>>
\n
"
note_result
=
"This is a string
\n
"
\
note_result
=
"
>
This is a string
\n
"
\
"
> with a blockquote
\n
"
\
" >
> with a blockquote
\n
"
\
"
> > That has a quote
\n
"
" >
> > That has a quote
\n
"
discussion
=
Discussion
.
new
([
create
(
:diff_note_on_merge_request
,
note:
note_text
)])
discussion
=
Discussion
.
new
([
create
(
:diff_note_on_merge_request
,
note:
note_text
)])
expect
(
service
.
item_for_discussion
(
discussion
)).
to
include
(
">>>
\n
#{
note_result
}
\n
>>>"
)
expect
(
service
.
item_for_discussion
(
discussion
)).
to
include
(
note_result
)
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