diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-09 15:06:13 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-09 15:06:13 +0300 |
commit | 0a850868dfb85086cba8320cee9dac4657dcae6c (patch) | |
tree | 40d17228fe23d9db7b861fe2a20d024d64c50323 /lib/gitlab/file_markdown_link_builder.rb | |
parent | 3744bcc0d10d24104e39985b6833a0ec51791c0a (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/file_markdown_link_builder.rb')
-rw-r--r-- | lib/gitlab/file_markdown_link_builder.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/file_markdown_link_builder.rb b/lib/gitlab/file_markdown_link_builder.rb index e9e5172e6f8..09d799b859d 100644 --- a/lib/gitlab/file_markdown_link_builder.rb +++ b/lib/gitlab/file_markdown_link_builder.rb @@ -10,14 +10,14 @@ module Gitlab return unless name = markdown_name markdown = "[#{name.gsub(']', '\\]')}](#{secure_url})" - markdown = "!#{markdown}" if image_or_video? || dangerous_image_or_video? + markdown = "!#{markdown}" if embeddable? || dangerous_embeddable? markdown end def markdown_name return unless filename.present? - image_or_video? ? File.basename(filename, File.extname(filename)) : filename + embeddable? ? File.basename(filename, File.extname(filename)) : filename end end end |