Commit 4f3876a2b6f3e0c14807058ba73336c1ebcb7613

Authored by Marin Jankovski
1 parent 741db760

Show images as raw and update the documentation.

app/helpers/gitlab_markdown_helper.rb
@@ -173,6 +173,7 @@ module GitlabMarkdownHelper @@ -173,6 +173,7 @@ module GitlabMarkdownHelper
173 # eg. doc/api is directory and doc/README.md is file 173 # eg. doc/api is directory and doc/README.md is file
174 def local_path(path) 174 def local_path(path)
175 return "tree" if Tree.new(@repository, current_ref, path).entries.any? 175 return "tree" if Tree.new(@repository, current_ref, path).entries.any?
  176 + return "raw" if @repository.blob_at(current_ref, path).image?
176 return "blob" 177 return "blob"
177 end 178 end
178 179
doc/markdown/markdown.md
@@ -326,12 +326,12 @@ Some text to show that the reference links can follow later. @@ -326,12 +326,12 @@ Some text to show that the reference links can follow later.
326 Here's our logo (hover to see the title text): 326 Here's our logo (hover to see the title text):
327 327
328 Inline-style: 328 Inline-style:
329 - ![alt text](/assets/logo-white.png "Logo Title Text 1") 329 + ![alt text](assets/logo-white.png)
330 330
331 Reference-style: 331 Reference-style:
332 - ![alt text][logo] 332 + ![alt text1][logo]
333 333
334 - [logo]: /assets/logo-white.png "Logo Title Text 2" 334 + [logo]: assets/logo-white.png
335 335
336 Here's our logo (hover to see the title text): 336 Here's our logo (hover to see the title text):
337 337