Fix file link with external path.

This commit is contained in:
Tom Preston-Werner
2010-07-20 22:26:13 -05:00
parent 8595ca5645
commit 8221bd6321
2 changed files with 12 additions and 1 deletions
+3 -1
View File
@@ -190,8 +190,10 @@ module Gollum
nil
end
if name && path
if name && path && file
%{<a href="#{::File.join @wiki.base_path, file.path}">#{name}</a>}
elsif name && path
%{<a href="#{path}">#{name}</a>}
else
nil
end