diff options
author | Thomas Boerger <thomas@webhippie.de> | 2016-12-06 18:58:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-06 18:58:31 +0100 |
commit | 83ed234472c85057100db5cc537049812c3a288c (patch) | |
tree | d6bb6623eb36dce5586c6f43495d99bb94b35827 /routers/repo | |
parent | 1b5b297c398a547b506029ac5a527ba9a5891ffb (diff) | |
download | gitea-83ed234472c85057100db5cc537049812c3a288c.tar.gz gitea-83ed234472c85057100db5cc537049812c3a288c.zip |
Integrate templates into bindata optionally (#314)
Integrated optional bindata for the templates
Diffstat (limited to 'routers/repo')
-rw-r--r-- | routers/repo/editor.go | 4 | ||||
-rw-r--r-- | routers/repo/view.go | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/routers/repo/editor.go b/routers/repo/editor.go index f037b39b21..8d45521a2e 100644 --- a/routers/repo/editor.go +++ b/routers/repo/editor.go @@ -18,7 +18,7 @@ import ( "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" - "code.gitea.io/gitea/modules/template" + "code.gitea.io/gitea/modules/templates" ) const ( @@ -74,7 +74,7 @@ func editFile(ctx *context.Context, isNewFile bool) { d, _ := ioutil.ReadAll(dataRc) buf = append(buf, d...) - if content, err := template.ToUTF8WithErr(buf); err != nil { + if content, err := templates.ToUTF8WithErr(buf); err != nil { if err != nil { log.Error(4, "ToUTF8WithErr: %v", err) } diff --git a/routers/repo/view.go b/routers/repo/view.go index 3ef3716f27..4417383bdc 100644 --- a/routers/repo/view.go +++ b/routers/repo/view.go @@ -16,11 +16,11 @@ import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/highlight" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/markdown" "code.gitea.io/gitea/modules/setting" - "code.gitea.io/gitea/modules/template" - "code.gitea.io/gitea/modules/template/highlight" + "code.gitea.io/gitea/modules/templates" "github.com/Unknwon/paginater" ) @@ -164,7 +164,7 @@ func renderFile(ctx *context.Context, entry *git.TreeEntry, treeLink, rawLink st } else { // Building code view blocks with line number on server side. var fileContent string - if content, err := template.ToUTF8WithErr(buf); err != nil { + if content, err := templates.ToUTF8WithErr(buf); err != nil { if err != nil { log.Error(4, "ToUTF8WithErr: %s", err) } |