aboutsummaryrefslogtreecommitdiff
path: root/js/luigi-template.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/luigi-template.js')
-rw-r--r--js/luigi-template.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/js/luigi-template.js b/js/luigi-template.js
index 473938f..f01d976 100644
--- a/js/luigi-template.js
+++ b/js/luigi-template.js
@@ -288,8 +288,9 @@ LuigiTemplate = (function() {
T.prototype.run = run;
// declare cache constructor
- T.Cache = function(templates, try_dom) {
+ T.Cache = function(templates, filters, try_dom) {
this.templates = templates;
+ this.filters = filters || FILTERS;
this.try_dom = !!try_dom;
this.cache = {};
};
@@ -310,15 +311,15 @@ LuigiTemplate = (function() {
}
// cache template
- this.cache[key] = new T(s);
+ this.cache[key] = new T(s, this.filters);
}
// run template
return this.cache[key].run(args);
};
- T.cache = function(args) {
- return new T.Cache(args);
+ T.cache = function(args, filters) {
+ return new T.Cache(args, filters || FILTERS);
}
// declare domcache constructor