fixed commit title when commit message is an empty string and ensured that link_to_gfm helper doesn't break on nil body
This commit is contained in:
parent
5604613025
commit
8d171a8cbc
2 changed files with 3 additions and 1 deletions
|
@ -11,6 +11,8 @@ module GitlabMarkdownHelper
|
|||
# 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 "" unless body && !body.strip.empty?
|
||||
|
||||
gfm_body = gfm(body, html_options)
|
||||
|
||||
gfm_body.gsub!(%r{<a.*?>.*?</a>}m) do |match|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue