Merge branch '17276-breakage-in-displaying-svg-in-the-same-repository' into 'master'
Resolve "Breakage in displaying SVG in the same repository" See merge request gitlab-org/gitlab-ce!31352
This commit is contained in:
commit
1bc2ac330e
3 changed files with 7 additions and 1 deletions
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
title: Fix inline rendering of relative paths to SVGs from the current repository
|
||||||
|
merge_request: 31352
|
||||||
|
author:
|
||||||
|
type: fixed
|
|
@ -45,7 +45,7 @@ module Gitlab
|
||||||
end
|
end
|
||||||
|
|
||||||
def image?
|
def image?
|
||||||
['.png', '.jpg', '.jpeg', '.gif'].include?(extname.downcase)
|
['.png', '.jpg', '.jpeg', '.gif', '.svg'].include?(extname.downcase)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Internal: Lookup mime type for extension.
|
# Internal: Lookup mime type for extension.
|
||||||
|
|
|
@ -556,6 +556,7 @@ eos
|
||||||
it 'returns the URI type at the given path' do
|
it 'returns the URI type at the given path' do
|
||||||
expect(commit.uri_type('files/html')).to be(:tree)
|
expect(commit.uri_type('files/html')).to be(:tree)
|
||||||
expect(commit.uri_type('files/images/logo-black.png')).to be(:raw)
|
expect(commit.uri_type('files/images/logo-black.png')).to be(:raw)
|
||||||
|
expect(commit.uri_type('files/images/wm.svg')).to be(:raw)
|
||||||
expect(project.commit('video').uri_type('files/videos/intro.mp4')).to be(:raw)
|
expect(project.commit('video').uri_type('files/videos/intro.mp4')).to be(:raw)
|
||||||
expect(commit.uri_type('files/js/application.js')).to be(:blob)
|
expect(commit.uri_type('files/js/application.js')).to be(:blob)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue