changeset 22769:3f808549d426

help: fix output of sections in `hg help foo.somesection` There was a bug in c3c3dd31fe1c. The block that added definitions to getsections should have been an elif, not an if. Otherwise section titles get added twice, since the else clause would always get executed for section titles.
author Jordi Gutiérrez Hermoso <jordigh@octave.org>
date Mon, 06 Oct 2014 07:29:38 -0400
parents 66bf251ee672
children de9424647fe4
files mercurial/minirst.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/minirst.py	Sat Oct 04 17:52:59 2014 -0400
+++ b/mercurial/minirst.py	Mon Oct 06 07:29:38 2014 -0400
@@ -687,7 +687,7 @@
             level = nest.index(i) + 1
             nest = nest[:level]
             secs.append((getname(b), level, [b]))
-        if b['type'] == 'definition':
+        elif b['type'] == 'definition':
             i = ' '
             if i not in nest:
                 nest += i