##// END OF EJS Templates
template: call runtemplate on the src argument to sub...
Sean Farley -
r19058:d8d548d8 default
parent child Browse files
Show More
@@ -251,6 +251,8 b' def sub(context, mapping, args):'
251 pat = stringify(args[0][0](context, mapping, args[0][1]))
251 pat = stringify(args[0][0](context, mapping, args[0][1]))
252 rpl = stringify(args[1][0](context, mapping, args[1][1]))
252 rpl = stringify(args[1][0](context, mapping, args[1][1]))
253 src = stringify(args[2][0](context, mapping, args[2][1]))
253 src = stringify(args[2][0](context, mapping, args[2][1]))
254 src = stringify(runtemplate(context, mapping,
255 compiletemplate(src, context)))
254 yield re.sub(pat, rpl, src)
256 yield re.sub(pat, rpl, src)
255
257
256 def if_(context, mapping, args):
258 def if_(context, mapping, args):
@@ -1531,3 +1531,7 b' Test new-style inline templating:'
1531 $ hg log -R latesttag -r tip --template 'modified files: {file_mods % " {file}\n"}\n'
1531 $ hg log -R latesttag -r tip --template 'modified files: {file_mods % " {file}\n"}\n'
1532 modified files: .hgtags
1532 modified files: .hgtags
1533
1533
1534 Test the sub function of templating for expansion:
1535
1536 $ hg log -R latesttag -r 10 --template '{sub("[0-9]", "x", "{rev}")}\n'
1537 xx
General Comments 0
You need to be logged in to leave comments. Login now