Commit 360ee25d authored by Darby's avatar Darby

Fixed the issues

parent c611b6f6
...@@ -118,7 +118,7 @@ module GitlabMarkdownHelper ...@@ -118,7 +118,7 @@ module GitlabMarkdownHelper
# Returns a random markdown tip for use as a textarea placeholder # Returns a random markdown tip for use as a textarea placeholder
def random_markdown_tip def random_markdown_tip
"#{MARKDOWN_TIPS.sample}" MARKDOWN_TIPS.sample
end end
private private
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
= render 'projects/zen', f: f, attr: :note, classes: 'note_text js-note-text js-task-list-field' = render 'projects/zen', f: f, attr: :note, classes: 'note_text js-note-text js-task-list-field'
.comment-hints.clearfix .comment-hints.clearfix
.pull-left #{link_to 'Markdown tip:', help_page_path('markdown', 'markdown'),{ target: '_blank', tabindex: -1 }} .pull-left #{link_to 'Markdown ', help_page_path('markdown', 'markdown'),{ target: '_blank', tabindex: -1 }}
.pull-right #{link_to 'Attach a file', '#', class: 'markdown-selector', tabindex: -1 } .pull-right #{link_to 'Attach a file', '#', class: 'markdown-selector', tabindex: -1 }
.note-form-actions .note-form-actions
......
...@@ -13,7 +13,8 @@ ...@@ -13,7 +13,8 @@
.comment-hints.clearfix .comment-hints.clearfix
.pull-left .pull-left
= link_to "Markdown tip:", help_page_path("markdown", "markdown"),{ target: '_blank', tabindex: -1 } = link_to "Markdown ", help_page_path("markdown", "markdown"),{ target: '_blank', tabindex: -1 }
tip:
= random_markdown_tip = random_markdown_tip
.pull-right .pull-right
= link_to '#', class: 'markdown-selector', tabindex: -1 do = link_to '#', class: 'markdown-selector', tabindex: -1 do
......
...@@ -137,6 +137,7 @@ describe GitlabMarkdownHelper do ...@@ -137,6 +137,7 @@ describe GitlabMarkdownHelper do
describe 'random_markdown_tip' do describe 'random_markdown_tip' do
it 'returns a random Markdown tip' do it 'returns a random Markdown tip' do
stub_const("#{described_class}::MARKDOWN_TIPS", ['Random tip']) stub_const("#{described_class}::MARKDOWN_TIPS", ['Random tip'])
expect(random_markdown_tip).to eq 'Random tip'
end end
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment