OSDN Git Service

Show images as raw and update the documentation.
authorMarin Jankovski <marin@gitlab.com>
Wed, 29 Jan 2014 16:28:51 +0000 (17:28 +0100)
committerMarin Jankovski <marin@gitlab.com>
Wed, 29 Jan 2014 16:28:51 +0000 (17:28 +0100)
app/helpers/gitlab_markdown_helper.rb
doc/markdown/markdown.md

index dd7d327..eb68607 100644 (file)
@@ -173,6 +173,7 @@ module GitlabMarkdownHelper
   # eg. doc/api is directory and doc/README.md is file
   def local_path(path)
     return "tree" if Tree.new(@repository, current_ref, path).entries.any?
+    return "raw" if @repository.blob_at(current_ref, path).image?
     return "blob"
   end
 
index 6b5308a..bfb93a4 100644 (file)
@@ -326,12 +326,12 @@ Some text to show that the reference links can follow later.
     Here's our logo (hover to see the title text):
 
     Inline-style: 
-    ![alt text](/assets/logo-white.png "Logo Title Text 1")
+    ![alt text](assets/logo-white.png)
 
     Reference-style: 
-    ![alt text][logo]
+    ![alt text1][logo]
 
-    [logo]: /assets/logo-white.png "Logo Title Text 2"
+    [logo]: assets/logo-white.png
 
 Here's our logo (hover to see the title text):