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
986b4a54
Commit
986b4a54
authored
Apr 11, 2016
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'rs-remove-markdown-tips' into 'master'
Remove `random_markdown_tip` helper Only usage got removed in !3442 See merge request !3637
parents
85279c07
f833726e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
30 deletions
+0
-30
gitlab_markdown_helper.rb
app/helpers/gitlab_markdown_helper.rb
+0
-23
gitlab_markdown_helper_spec.rb
spec/helpers/gitlab_markdown_helper_spec.rb
+0
-7
No files found.
app/helpers/gitlab_markdown_helper.rb
View file @
986b4a54
...
@@ -116,29 +116,6 @@ module GitlabMarkdownHelper
...
@@ -116,29 +116,6 @@ module GitlabMarkdownHelper
end
end
end
end
MARKDOWN_TIPS
=
[
"End a line with two or more spaces for a line-break, or soft-return"
,
"Inline code can be denoted by `surrounding it with backticks`"
,
"Blocks of code can be denoted by three backticks ``` or four leading spaces"
,
"Emoji can be added by :emoji_name:, for example :thumbsup:"
,
"Notify other participants using @user_name"
,
"Notify a specific group using @group_name"
,
"Notify the entire team using @all"
,
"Reference an issue using a hash, for example issue #123"
,
"Reference a merge request using an exclamation point, for example MR !123"
,
"Italicize words or phrases using *asterisks* or _underscores_"
,
"Bold words or phrases using **double asterisks** or __double underscores__"
,
"Strikethrough words or phrases using ~~two tildes~~"
,
"Make a bulleted list using + pluses, - minuses, or * asterisks"
,
"Denote blockquotes using > at the beginning of a line"
,
"Make a horizontal line using three or more hyphens ---, asterisks ***, or underscores ___"
].
freeze
# Returns a random markdown tip for use as a textarea placeholder
def
random_markdown_tip
MARKDOWN_TIPS
.
sample
end
private
private
# Return +text+, truncated to +max_chars+ characters, excluding any HTML
# Return +text+, truncated to +max_chars+ characters, excluding any HTML
...
...
spec/helpers/gitlab_markdown_helper_spec.rb
View file @
986b4a54
...
@@ -150,13 +150,6 @@ describe GitlabMarkdownHelper do
...
@@ -150,13 +150,6 @@ describe GitlabMarkdownHelper do
end
end
end
end
describe
'random_markdown_tip'
do
it
'returns a random Markdown tip'
do
stub_const
(
"
#{
described_class
}
::MARKDOWN_TIPS"
,
[
'Random tip'
])
expect
(
random_markdown_tip
).
to
eq
'Random tip'
end
end
describe
'#first_line_in_markdown'
do
describe
'#first_line_in_markdown'
do
let
(
:text
)
{
"@
#{
user
.
username
}
, can you look at this?
\n
Hello world
\n
"
}
let
(
:text
)
{
"@
#{
user
.
username
}
, can you look at this?
\n
Hello world
\n
"
}
...
...
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