From 4f3876a2b6f3e0c14807058ba73336c1ebcb7613 Mon Sep 17 00:00:00 2001 From: Marin Jankovski Date: Wed, 29 Jan 2014 17:28:51 +0100 Subject: [PATCH] Show images as raw and update the documentation. --- app/helpers/gitlab_markdown_helper.rb | 1 + doc/markdown/markdown.md | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/helpers/gitlab_markdown_helper.rb b/app/helpers/gitlab_markdown_helper.rb index dd7d327..eb68607 100644 --- a/app/helpers/gitlab_markdown_helper.rb +++ b/app/helpers/gitlab_markdown_helper.rb @@ -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 diff --git a/doc/markdown/markdown.md b/doc/markdown/markdown.md index 6b5308a..bfb93a4 100644 --- a/doc/markdown/markdown.md +++ b/doc/markdown/markdown.md @@ -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): -- libgit2 0.21.2