comparison mercurial/templatefuncs.py @ 38040:a3b4ccbec269 stable

help: correct signature of separate() template function Without the dots, it looked as if separate() would take a list of arguments.
author Yuya Nishihara <yuya@tcha.org>
date Thu, 24 May 2018 21:54:31 +0900
parents 7b2955624777
children 3277940a935f
comparison
equal deleted inserted replaced
38039:5b831053d9b6 38040:a3b4ccbec269
553 text = evalstring(context, mapping, args[0]) 553 text = evalstring(context, mapping, args[0])
554 style = evalstring(context, mapping, args[1]) 554 style = evalstring(context, mapping, args[1])
555 555
556 return minirst.format(text, style=style, keep=['verbose']) 556 return minirst.format(text, style=style, keep=['verbose'])
557 557
558 @templatefunc('separate(sep, args)', argspec='sep *args') 558 @templatefunc('separate(sep, args...)', argspec='sep *args')
559 def separate(context, mapping, args): 559 def separate(context, mapping, args):
560 """Add a separator between non-empty arguments.""" 560 """Add a separator between non-empty arguments."""
561 if 'sep' not in args: 561 if 'sep' not in args:
562 # i18n: "separate" is a keyword 562 # i18n: "separate" is a keyword
563 raise error.ParseError(_("separate expects at least one argument")) 563 raise error.ParseError(_("separate expects at least one argument"))