Add support for proper lambdas (#48)
* Add support for proper lambdas * Get rid of recursion Remove renderSectionLambda as I can use renderUnescapedLambda for that.
This commit is contained in:
@@ -24,7 +24,9 @@ extension MustacheTemplate {
|
||||
let fs = FileManager()
|
||||
guard let data = fs.contents(atPath: filename) else { return nil }
|
||||
let string = String(decoding: data, as: Unicode.UTF8.self)
|
||||
self.tokens = try Self.parse(string)
|
||||
let template = try Self.parse(string)
|
||||
self.tokens = template.tokens
|
||||
self.text = string
|
||||
self.filename = filename
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user