Add testPartialInSubfolder (#72)
* Add testPartialInSubfolder * Replace windows folder separator with mac/linux folder separator
This commit is contained in:
@@ -31,7 +31,11 @@ extension MustacheLibrary {
|
||||
guard let template = try MustacheTemplate(filename: directory + path) else { continue }
|
||||
// drop ".mustache" from path to get name
|
||||
let name = String(path.dropLast(extWithDot.count))
|
||||
#if os(Windows)
|
||||
templates[name.replacingOccurrences(of: "\\", with: "/")] = template
|
||||
#else
|
||||
templates[name] = template
|
||||
#endif
|
||||
} catch let error as MustacheTemplate.ParserError {
|
||||
throw ParserError(filename: path, context: error.context, error: error.error)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user