mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-17 11:59:30 +00:00
Implementation of Folder Jumping
This commit is contained in:
parent
331316894e
commit
c22f9114c7
6 changed files with 54 additions and 5 deletions
|
@ -117,6 +117,17 @@ func NewFuncMap() []template.FuncMap {
|
|||
}
|
||||
return "tab-size-8"
|
||||
},
|
||||
"SubJumpablePath": func(str string) []string {
|
||||
var path []string
|
||||
index := strings.LastIndex(str, "/")
|
||||
if index != -1 && index != len(str) {
|
||||
path = append(path, string(str[0:index+1]))
|
||||
path = append(path, string(str[index+1:]))
|
||||
} else {
|
||||
path = append(path, str)
|
||||
}
|
||||
return path
|
||||
},
|
||||
}}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue