fix rendering templates created from string literals
This commit is contained in:
@@ -43,6 +43,8 @@ public struct Environment {
|
||||
}
|
||||
|
||||
func render(template: Template, context: [String: Any]?) throws -> String {
|
||||
// update temaplte environment as it cen be created from string literal with default environment
|
||||
template.environment = self
|
||||
errorReporter.context = ErrorReporterContext(template: template)
|
||||
do {
|
||||
return try template.render(context)
|
||||
|
||||
Reference in New Issue
Block a user