comparison mercurial/templatefuncs.py @ 39310:a2a5d4ad5276

minirst: make format() simply return a formatted text It's a source of bugs to change the type of the return value conditionally.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 05 Aug 2018 12:11:19 +0900
parents 3588e41f796d
children 83f8f7b9fa60
comparison
equal deleted inserted replaced
39309:0a766cb1092a 39310:a2a5d4ad5276
573 raise error.ParseError(_("rstdoc expects two arguments")) 573 raise error.ParseError(_("rstdoc expects two arguments"))
574 574
575 text = evalstring(context, mapping, args[0]) 575 text = evalstring(context, mapping, args[0])
576 style = evalstring(context, mapping, args[1]) 576 style = evalstring(context, mapping, args[1])
577 577
578 return minirst.format(text, style=style, keep=['verbose'])[0] 578 return minirst.format(text, style=style, keep=['verbose'])
579 579
580 @templatefunc('separate(sep, args...)', argspec='sep *args') 580 @templatefunc('separate(sep, args...)', argspec='sep *args')
581 def separate(context, mapping, args): 581 def separate(context, mapping, args):
582 """Add a separator between non-empty arguments.""" 582 """Add a separator between non-empty arguments."""
583 if 'sep' not in args: 583 if 'sep' not in args: