aboutsummaryrefslogtreecommitdiffstats
path: root/modules/templates/helper.go
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2023-04-18 03:05:19 +0800
committerGitHub <noreply@github.com>2023-04-17 15:05:19 -0400
commit1ab16e48cccc086e7f97fb3ae8a293fe47a3a452 (patch)
tree24f19185b5606ea605f5d74d6369dbfd4dc2d189 /modules/templates/helper.go
parentf045e58cc7ba076a0ac4b0b5bf0702fa155eaa59 (diff)
downloadgitea-1ab16e48cccc086e7f97fb3ae8a293fe47a3a452.tar.gz
gitea-1ab16e48cccc086e7f97fb3ae8a293fe47a3a452.zip
Improve Wiki TOC (#24137)
The old code has a lot of technical debts, eg: `repo/wiki/view.tmpl` / `Iterate` This PR improves the Wiki TOC display and improves the code. --------- Co-authored-by: delvh <dev.lh@web.de>
Diffstat (limited to 'modules/templates/helper.go')
-rw-r--r--modules/templates/helper.go7
1 files changed, 0 insertions, 7 deletions
diff --git a/modules/templates/helper.go b/modules/templates/helper.go
index 27d6000daf..24687a4606 100644
--- a/modules/templates/helper.go
+++ b/modules/templates/helper.go
@@ -171,13 +171,6 @@ func NewFuncMap() []template.FuncMap {
}
return false
},
- "Iterate": func(arg interface{}) (items []int64) {
- count, _ := util.ToInt64(arg)
- for i := int64(0); i < count; i++ {
- items = append(items, i)
- }
- return items
- },
// -----------------------------------------------------------------
// setting