From 12626f029dc4ab345f8afa1fd42a3c04723ec55e Mon Sep 17 00:00:00 2001 From: Douwe Maan <douwe@gitlab.com> Date: Wed, 7 Oct 2015 15:17:43 +0200 Subject: [PATCH] Return strings where expected --- app/helpers/gitlab_markdown_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/helpers/gitlab_markdown_helper.rb b/app/helpers/gitlab_markdown_helper.rb index 40161c5a641..6264b7f82ef 100644 --- a/app/helpers/gitlab_markdown_helper.rb +++ b/app/helpers/gitlab_markdown_helper.rb @@ -45,7 +45,7 @@ module GitlabMarkdownHelper end def markdown(text, context = {}) - return unless text.present? + return "" unless text.present? context.reverse_merge!( path: @path, @@ -62,7 +62,7 @@ module GitlabMarkdownHelper # TODO (rspeicher): Remove all usages of this helper and just call `markdown` # with a custom pipeline depending on the content being rendered def gfm(text, options = {}) - return unless text.present? + return "" unless text.present? options.reverse_merge!( path: @path, -- GitLab