Adjust url only if enableWikiLink is true.

This commit is contained in:
takezoe
2013-06-16 03:47:25 +09:00
parent 8f0e2fe442
commit c259655adc

View File

@@ -96,7 +96,7 @@ class GitBucketHtmlSerializer(
} }
private def fixUrl(url: String): String = { private def fixUrl(url: String): String = {
if(url.startsWith("http://") || url.startsWith("https://")) url if(!enableWikiLink || url.startsWith("http://") || url.startsWith("https://")) url
else repository.url.replaceFirst("/git/", "/").replaceFirst("\\.git$", "") + "/wiki/_blob/" + url else repository.url.replaceFirst("/git/", "/").replaceFirst("\\.git$", "") + "/wiki/_blob/" + url
} }