Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
3b1da9be
Commit
3b1da9be
authored
Aug 01, 2019
by
Heinrich Lee Yu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix inline rendering of SVGs from current repo
Changes generated URL to raw instead of blob
parent
52b857f1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
1 deletion
+7
-1
changelogs/unreleased/17276-breakage-in-displaying-svg-in-the-same-repository.yml
...276-breakage-in-displaying-svg-in-the-same-repository.yml
+5
-0
lib/gitlab/blob_helper.rb
lib/gitlab/blob_helper.rb
+1
-1
spec/models/commit_spec.rb
spec/models/commit_spec.rb
+1
-0
No files found.
changelogs/unreleased/17276-breakage-in-displaying-svg-in-the-same-repository.yml
0 → 100644
View file @
3b1da9be
---
title
:
Fix inline rendering of relative paths to SVGs from the current repository
merge_request
:
31352
author
:
type
:
fixed
lib/gitlab/blob_helper.rb
View file @
3b1da9be
...
...
@@ -45,7 +45,7 @@ module Gitlab
end
def
image?
[
'.png'
,
'.jpg'
,
'.jpeg'
,
'.gif'
].
include?
(
extname
.
downcase
)
[
'.png'
,
'.jpg'
,
'.jpeg'
,
'.gif'
,
'.svg'
].
include?
(
extname
.
downcase
)
end
# Internal: Lookup mime type for extension.
...
...
spec/models/commit_spec.rb
View file @
3b1da9be
...
...
@@ -556,6 +556,7 @@ eos
it
'returns the URI type at the given path'
do
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/wm.svg'
)).
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
)
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment