fix: Allow overriding default filters/tags

This commit is contained in:
Kyle Fuller
2016-12-07 22:32:31 +00:00
parent 26f30cbd9d
commit 2331b11a52
2 changed files with 13 additions and 1 deletions

View File

@@ -7,7 +7,7 @@ public struct Environment {
public init(loader: Loader? = nil, extensions: [Extension]? = nil, templateClass: Template.Type = Template.self) {
self.templateClass = templateClass
self.loader = loader
self.extensions = [DefaultExtension()] + (extensions ?? [])
self.extensions = (extensions ?? []) + [DefaultExtension()]
}
public func loadTemplate(name: String) throws -> Template {