mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-12-16 13:29:52 +01:00
Co-authored-by: Naoki Takezoe <takezoe@gmail.com>
This commit is contained in:
committed by
GitHub
parent
88a8973685
commit
0d6e5af8d7
@@ -192,7 +192,13 @@ object Markdown {
|
||||
.stripSuffix(".git") + "/blob/" + branch + "/" + urlWithRawParam
|
||||
}
|
||||
} else {
|
||||
repository.httpUrl.replaceFirst("/git/", "/").stripSuffix(".git") + "/wiki/_blob/" + url
|
||||
// URL is being modified to link to the image file on the repository, but users may want to link to the page if the page name is a link.
|
||||
// As a interim solution, if the link contains a ., it will use the current conversion, otherwise it will perform the conversion the user wants.
|
||||
if (url.lastIndexOf(".") > 0) {
|
||||
repository.httpUrl.replaceFirst("/git/", "/").stripSuffix(".git") + "/wiki/_blob/" + url
|
||||
} else {
|
||||
repository.httpUrl.replaceFirst("/git/", "/").stripSuffix(".git") + "/wiki/" + url
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user