diff --git a/app/helpers/markdown_helper.rb b/app/helpers/markdown_helper.rb index 77ffdab..2dc38c5 100644 --- a/app/helpers/markdown_helper.rb +++ b/app/helpers/markdown_helper.rb @@ -24,8 +24,9 @@ def link(link, _title, content) end def codespan(quote) - %(#{escape_html(quote.gsub("\n", - ''))}) + return '' if quote.nil? # Return an empty string if quote is nil + + %(#{escape_html(quote.gsub("\n", ''))}) end def block_code(code, _language)