mercurial/templater.py
changeset 28546 1987ed32efca
parent 28545 1d461ee26e1b
child 28547 73d01cba5810
equal deleted inserted replaced
28545:1d461ee26e1b 28546:1987ed32efca
   208     return [x]
   208     return [x]
   209 
   209 
   210 def gettemplate(exp, context):
   210 def gettemplate(exp, context):
   211     """Compile given template tree or load named template from map file;
   211     """Compile given template tree or load named template from map file;
   212     returns (func, data) pair"""
   212     returns (func, data) pair"""
   213     if exp[0] == 'template':
   213     if exp[0] in ('template', 'string'):
   214         return compileexp(exp, context, methods)
   214         return compileexp(exp, context, methods)
   215     if exp[0] == 'symbol':
   215     if exp[0] == 'symbol':
   216         # unlike runsymbol(), here 'symbol' is always taken as template name
   216         # unlike runsymbol(), here 'symbol' is always taken as template name
   217         # even if it exists in mapping. this allows us to override mapping
   217         # even if it exists in mapping. this allows us to override mapping
   218         # by web templates, e.g. 'changelogtag' is redefined in map file.
   218         # by web templates, e.g. 'changelogtag' is redefined in map file.