##// END OF EJS Templates
formatter: port handling of 'originalnode' to populatemap() hook...
Yuya Nishihara -
r37122:7db3c28d default
parent child Browse files
Show More
@@ -514,6 +514,8 b' class templateresources(templater.resour'
514 mapping = {}
514 mapping = {}
515 if self._hasctx(newmapping):
515 if self._hasctx(newmapping):
516 mapping['revcache'] = {} # per-ctx cache
516 mapping['revcache'] = {} # per-ctx cache
517 if 'node' in origmapping and 'node' in newmapping:
518 mapping['originalnode'] = origmapping['node']
517 return mapping
519 return mapping
518
520
519 def _getsome(self, context, mapping, key):
521 def _getsome(self, context, mapping, key):
@@ -406,7 +406,6 b' def runmap(context, mapping, data):'
406 if isinstance(v, dict):
406 if isinstance(v, dict):
407 lm = context.overlaymap(mapping, v)
407 lm = context.overlaymap(mapping, v)
408 lm['index'] = i
408 lm['index'] = i
409 lm['originalnode'] = mapping.get('node')
410 yield evalrawexp(context, lm, targ)
409 yield evalrawexp(context, lm, targ)
411 else:
410 else:
412 # v is not an iterable of dicts, this happen when 'key'
411 # v is not an iterable of dicts, this happen when 'key'
General Comments 0
You need to be logged in to leave comments. Login now