##// END OF EJS Templates
formatter: provide hint of referenced field names...
Yuya Nishihara -
r38375:8221df64 default
parent child Browse files
Show More
@@ -198,6 +198,9 b' class baseformatter(object):'
198 assert all(k in {'ctx', 'fctx'} for k in ctxs)
198 assert all(k in {'ctx', 'fctx'} for k in ctxs)
199 if self._converter.storecontext:
199 if self._converter.storecontext:
200 self._item.update(ctxs)
200 self._item.update(ctxs)
201 def datahint(self):
202 '''set of field names to be referenced'''
203 return set()
201 def data(self, **data):
204 def data(self, **data):
202 '''insert data into item that's not shown in default output'''
205 '''insert data into item that's not shown in default output'''
203 data = pycompat.byteskwargs(data)
206 data = pycompat.byteskwargs(data)
@@ -411,6 +414,14 b' class templateformatter(baseformatter):'
411 ref = self._parts[part]
414 ref = self._parts[part]
412 self._out.write(self._t.render(ref, item))
415 self._out.write(self._t.render(ref, item))
413
416
417 @util.propertycache
418 def _symbolsused(self):
419 return self._t.symbolsuseddefault()
420
421 def datahint(self):
422 '''set of field names to be referenced from the template'''
423 return self._symbolsused[0]
424
414 def end(self):
425 def end(self):
415 baseformatter.end(self)
426 baseformatter.end(self)
416 self._renderitem('docfooter', {})
427 self._renderitem('docfooter', {})
General Comments 0
You need to be logged in to leave comments. Login now