aboutsummaryrefslogtreecommitdiffstats
path: root/modules/templates/helper.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2019-09-06 10:20:09 +0800
committertechknowlogick <techknowlogick@gitea.io>2019-09-05 22:20:09 -0400
commitc03d75fbd51174d0e7ffdbaf9e9e253438d06cf7 (patch)
treea54e9fdfb6ff96baf7010d7fd5049a05a16644e2 /modules/templates/helper.go
parentb660a732ae283d863636ead9cc1a365ce1c0edc1 (diff)
downloadgitea-c03d75fbd51174d0e7ffdbaf9e9e253438d06cf7.tar.gz
gitea-c03d75fbd51174d0e7ffdbaf9e9e253438d06cf7.zip
Move git diff codes from models to services/gitdiff (#7889)
* move git diff codes from models to services/gitdiff * fix template * fix test * fix template
Diffstat (limited to 'modules/templates/helper.go')
-rw-r--r--modules/templates/helper.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/templates/helper.go b/modules/templates/helper.go
index e0285808f8..147df3a788 100644
--- a/modules/templates/helper.go
+++ b/modules/templates/helper.go
@@ -27,6 +27,7 @@ import (
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/timeutil"
"code.gitea.io/gitea/modules/util"
+ "code.gitea.io/gitea/services/gitdiff"
"gopkg.in/editorconfig/editorconfig-core-go.v1"
)
@@ -230,6 +231,7 @@ func NewFuncMap() []template.FuncMap {
}
return float32(n) * 100 / float32(sum)
},
+ "CommentMustAsDiff": gitdiff.CommentMustAsDiff,
}}
}