mercurial/templatefuncs.py
changeset 38251 ead71b15efd5
parent 38239 1c8098cf560a
parent 37858 3277940a935f
child 38252 c2456a7726c1
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"))