# HG changeset patch # User Anton Shestakov # Date 2018-06-06 13:19:42 # Node ID 3277940a935f499e5cb953ca17eebe5543470ca8 # Parent ca473c05bd10e6a41fe86baa917ad14a8c15d981 templatefuncs: only render text portion of minirst.format() result When "keep" argument is provided, the function returns (text, pruned), where pruned is a list of sections from the original plain text that were pruned from the rendered result. Let's not output it together with the rendered HTML. diff --git a/mercurial/templatefuncs.py b/mercurial/templatefuncs.py --- a/mercurial/templatefuncs.py +++ b/mercurial/templatefuncs.py @@ -553,7 +553,7 @@ def rstdoc(context, mapping, args): text = evalstring(context, mapping, args[0]) style = evalstring(context, mapping, args[1]) - return minirst.format(text, style=style, keep=['verbose']) + return minirst.format(text, style=style, keep=['verbose'])[0] @templatefunc('separate(sep, args...)', argspec='sep *args') def separate(context, mapping, args): diff --git a/tests/test-help.t b/tests/test-help.t --- a/tests/test-help.t +++ b/tests/test-help.t @@ -3138,7 +3138,7 @@ Dish up an empty repo; serve it cold.

which will prevent the pager from running.

- windows +