Skip to content

Commit

Permalink
fix: Loader replaces \ with / for the filename
Browse files Browse the repository at this point in the history
  • Loading branch information
xgfone committed Apr 28, 2020
1 parent 6b95076 commit 5551c1a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions render/template/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ func (l tmplLoader) loadFile(prefix, filename string) (File, error) {
}

name := strings.TrimPrefix(filename, prefix)
name = strings.Replace(name, "\\", "/", -1)
ext := filepath.Ext(name)
// name = strings.TrimSuffix(name, ext)
return NewFile(name, ext, data), nil
Expand Down

0 comments on commit 5551c1a

Please sign in to comment.