1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-21 11:57:02 +00:00
This commit is contained in:
Makis Maropoulos
2016-06-05 13:39:45 +03:00
parent e40fe0a9f3
commit 91b45ebfdb
4 changed files with 57 additions and 37 deletions

View File

@@ -13,10 +13,12 @@ type Engine struct {
// New creates and returns a new JadeEngine with its configs
func New(cfg config.Template) *Engine {
cfg.HTMLTemplate.Funcs = cfg.Jade.Funcs //copy the jade's funcs to the underline HTMLEngine
cfg.HTMLTemplate.LayoutFuncs = cfg.Jade.LayoutFuncs
underline := &Engine{Engine: html.New(cfg)}
underline.Middleware = func(relativeName string, fileContents string) (string, error) {
return jade.Parse(relativeName, fileContents)
}
return underline
}