Skip to content
Snippets Groups Projects
Commit 12626f02 authored by Douwe Maan's avatar Douwe Maan
Browse files

Return strings where expected

parent 4f629dab
No related branches found
No related tags found
1 merge request!1090Separate rendering of Markdown reference links from redacting those the user doesn't have access to and extracting referenced objects
Pipeline #
Loading
@@ -45,7 +45,7 @@ module GitlabMarkdownHelper
Loading
@@ -45,7 +45,7 @@ module GitlabMarkdownHelper
end end
   
def markdown(text, context = {}) def markdown(text, context = {})
return unless text.present? return "" unless text.present?
   
context.reverse_merge!( context.reverse_merge!(
path: @path, path: @path,
Loading
@@ -62,7 +62,7 @@ module GitlabMarkdownHelper
Loading
@@ -62,7 +62,7 @@ module GitlabMarkdownHelper
# TODO (rspeicher): Remove all usages of this helper and just call `markdown` # TODO (rspeicher): Remove all usages of this helper and just call `markdown`
# with a custom pipeline depending on the content being rendered # with a custom pipeline depending on the content being rendered
def gfm(text, options = {}) def gfm(text, options = {})
return unless text.present? return "" unless text.present?
   
options.reverse_merge!( options.reverse_merge!(
path: @path, path: @path,
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment