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")) |