mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-04 20:45:58 +01:00
(refs #713)Fix anchor to headline in Wiki
This commit is contained in:
@@ -123,8 +123,10 @@ class GitBucketHtmlSerializer(
|
||||
}
|
||||
|
||||
private def fixUrl(url: String, isImage: Boolean = false): String = {
|
||||
if(url.startsWith("http://") || url.startsWith("https://") || url.startsWith("#") || url.startsWith("/")){
|
||||
if(url.startsWith("http://") || url.startsWith("https://") || url.startsWith("/")){
|
||||
url
|
||||
} else if(url.startsWith("#")){
|
||||
("#" + GitBucketHtmlSerializer.generateAnchorName(url.substring(1)))
|
||||
} else if(!enableWikiLink){
|
||||
if(context.currentPath.contains("/blob/")){
|
||||
url + (if(isImage) "?raw=true" else "")
|
||||
|
||||
Reference in New Issue
Block a user