fix create model when template detection errors

This commit is contained in:
Michael Yang
2024-06-07 08:55:46 -07:00
parent ce0dc33cb8
commit 030e765e76
7 changed files with 76 additions and 54 deletions

View File

@@ -30,7 +30,8 @@ var templatesOnce = sync.OnceValues(func() ([]*Template, error) {
return nil, err
}
t.Bytes = bts
// normalize line endings
t.Bytes = bytes.ReplaceAll(bts, []byte("\r\n"), []byte("\n"))
}
return templates, nil