##// END OF EJS Templates
templater: remove redundant member variables from templater class...
Yuya Nishihara -
r38459:3813c6b7 @51 default
parent child Browse files
Show More
@@ -863,17 +863,11 b' class templater(object):'
863 863 self.cache may be updated later to register additional template
864 864 fragments.
865 865 """
866 if filters is None:
867 filters = {}
868 if defaults is None:
869 defaults = {}
870 self._filters = templatefilters.filters.copy()
871 self._filters.update(filters)
872 self.defaults = defaults
873 self._resources = resources
866 allfilters = templatefilters.filters.copy()
867 if filters:
868 allfilters.update(filters)
874 869 self._loader = loader(cache, aliases)
875 self._proc = engine(self._loader.load, self._filters, self.defaults,
876 self._resources)
870 self._proc = engine(self._loader.load, allfilters, defaults, resources)
877 871 self._minchunk, self._maxchunk = minchunk, maxchunk
878 872
879 873 @classmethod
@@ -894,6 +888,15 b' class templater(object):'
894 888 def cache(self):
895 889 return self._loader.cache
896 890
891 # for highlight extension to insert one-time 'colorize' filter
892 @property
893 def _filters(self):
894 return self._proc._filters
895
896 @property
897 def defaults(self):
898 return self._proc._defaults
899
897 900 def load(self, t):
898 901 """Get parsed tree for the given template name. Use a local cache."""
899 902 return self._loader.load(t)
General Comments 0
You need to be logged in to leave comments. Login now