mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-08 06:25:51 +01:00
(refs #509)Fix link broken bug in Wiki
This commit is contained in:
@@ -103,10 +103,10 @@ class GitBucketHtmlSerializer(
|
|||||||
}
|
}
|
||||||
|
|
||||||
private def fixUrl(url: String, isImage: Boolean = false): String = {
|
private def fixUrl(url: String, isImage: Boolean = false): String = {
|
||||||
if(!enableWikiLink){
|
if(url.startsWith("http://") || url.startsWith("https://") || url.startsWith("#") || url.startsWith("/")){
|
||||||
if(url.startsWith("http://") || url.startsWith("https://") || url.startsWith("#") || url.startsWith("/")){
|
url
|
||||||
url
|
} else if(!enableWikiLink){
|
||||||
} else if(context.currentPath.contains("/blob/")){
|
if(context.currentPath.contains("/blob/")){
|
||||||
url + (if(isImage) "?raw=true" else "")
|
url + (if(isImage) "?raw=true" else "")
|
||||||
} else if(context.currentPath.contains("/tree/")){
|
} else if(context.currentPath.contains("/tree/")){
|
||||||
val paths = context.currentPath.split("/")
|
val paths = context.currentPath.split("/")
|
||||||
|
|||||||
Reference in New Issue
Block a user