removed trailing witespaces

This commit is contained in:
Ilya Puchka
2017-12-27 18:48:37 +01:00
parent 4bfdb73175
commit 662849e968
12 changed files with 51 additions and 51 deletions

View File

@@ -9,7 +9,7 @@ public struct Environment {
extensions: [Extension]? = nil,
templateClass: Template.Type = Template.self,
errorReporter: ErrorReporter = SimpleErrorReporter()) {
self.templateClass = templateClass
self.errorReporter = errorReporter
self.loader = loader
@@ -41,11 +41,11 @@ public struct Environment {
let template = templateClass.init(templateString: string, environment: self)
return try render(template: template, context: context)
}
func render(template: Template, context: [String: Any]?) throws -> String {
// update template environment as it can be created from string literal with default environment
template.environment = self
return try template.render(context)
}
}