Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToon Claes <toon@gitlab.com>2017-04-24 12:25:03 +0300
committerToon Claes <toon@gitlab.com>2017-04-27 14:22:17 +0300
commit310c3b21d18b45973be4d71cbb44276acac4f476 (patch)
treeca92edf74dd87aaedd6ca0c25addbab52691e3da /app/helpers/markup_helper.rb
parent4f2d6b3e21911ab29ae18dff1be909d94f3127ed (diff)
Single quotes in MarkupHelper where possible
Diffstat (limited to 'app/helpers/markup_helper.rb')
-rw-r--r--app/helpers/markup_helper.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/app/helpers/markup_helper.rb b/app/helpers/markup_helper.rb
index 95036ccf57d..11e8cbf0940 100644
--- a/app/helpers/markup_helper.rb
+++ b/app/helpers/markup_helper.rb
@@ -27,7 +27,7 @@ module MarkupHelper
# explicitly produce the correct linking behavior (i.e.
# "<a>outer text </a><a>gfm ref</a><a> more outer text</a>").
def link_to_gfm(body, url, html_options = {})
- return "" if body.blank?
+ return '' if body.blank?
context = {
project: @project,
@@ -70,7 +70,7 @@ module MarkupHelper
end
def markdown(text, context = {})
- return "" unless text.present?
+ return '' unless text.present?
context[:project] ||= @project
html = context.delete(:rendered) || markdown_unsafe(text, context)
@@ -79,7 +79,7 @@ module MarkupHelper
def markdown_field(object, field)
object = object.for_display if object.respond_to?(:for_display)
- return "" unless object.present?
+ return '' unless object.present?
html = Banzai.render_field(object, field)
banzai_postprocess(html, object.banzai_render_context(field))
@@ -93,7 +93,7 @@ module MarkupHelper
def render_wiki_content(wiki_page)
text = wiki_page.content
- return "" unless text.present?
+ return '' unless text.present?
context = { pipeline: :wiki, project: @project, project_wiki: @project_wiki, page_slug: wiki_page.slug }
@@ -111,7 +111,7 @@ module MarkupHelper
end
def markup_unsafe(file_name, text, context = {})
- return "" unless text.present?
+ return '' unless text.present?
if gitlab_markdown?(file_name)
Hamlit::RailsHelpers.preserve(markdown_unsafe(text, context))
@@ -213,10 +213,10 @@ module MarkupHelper
end
def markdown_toolbar_button(options = {})
- data = options[:data].merge({ container: "body" })
+ data = options[:data].merge({ container: 'body' })
content_tag :button,
- type: "button",
- class: "toolbar-btn js-md has-tooltip hidden-xs",
+ type: 'button',
+ class: 'toolbar-btn js-md has-tooltip hidden-xs',
tabindex: -1,
data: data,
title: options[:title],
@@ -227,7 +227,7 @@ module MarkupHelper
# Calls Banzai.post_process with some common context options
def banzai_postprocess(html, context = {})
- return "" unless html.present?
+ return '' unless html.present?
context.merge!(
current_user: (current_user if defined?(current_user)),