comparison mercurial/templatefuncs.py @ 38251:ead71b15efd5

merge with stable
author Augie Fackler <augie@google.com>
date Wed, 06 Jun 2018 13:31:24 -0400
parents 1c8098cf560a 3277940a935f
children c2456a7726c1
comparison
equal deleted inserted replaced
38250:2b8c8b8d1a06 38251:ead71b15efd5
557 raise error.ParseError(_("rstdoc expects two arguments")) 557 raise error.ParseError(_("rstdoc expects two arguments"))
558 558
559 text = evalstring(context, mapping, args[0]) 559 text = evalstring(context, mapping, args[0])
560 style = evalstring(context, mapping, args[1]) 560 style = evalstring(context, mapping, args[1])
561 561
562 return minirst.format(text, style=style, keep=['verbose']) 562 return minirst.format(text, style=style, keep=['verbose'])[0]
563 563
564 @templatefunc('separate(sep, args)', argspec='sep *args') 564 @templatefunc('separate(sep, args...)', argspec='sep *args')
565 def separate(context, mapping, args): 565 def separate(context, mapping, args):
566 """Add a separator between non-empty arguments.""" 566 """Add a separator between non-empty arguments."""
567 if 'sep' not in args: 567 if 'sep' not in args:
568 # i18n: "separate" is a keyword 568 # i18n: "separate" is a keyword
569 raise error.ParseError(_("separate expects at least one argument")) 569 raise error.ParseError(_("separate expects at least one argument"))