minirst: fix container stripping logic
authorMatt Mackall <mpm@selenic.com>
Fri, 16 Sep 2011 14:37:53 -0500
changeset 15102 a7e375d087f6
parent 15101 a21ccf4412d5
child 15103 5ca8c111e9aa
minirst: fix container stripping logic
mercurial/minirst.py
--- a/mercurial/minirst.py	Wed Sep 14 22:28:27 2011 -0400
+++ b/mercurial/minirst.py	Fri Sep 16 14:37:53 2011 -0500
@@ -239,10 +239,10 @@
             # Always delete "..container:: type" block
             del blocks[i]
             j = i
+            i -= 1
             while j < len(blocks) and blocks[j]['indent'] > indent:
                 if prune:
                     del blocks[j]
-                    i -= 1 # adjust outer index
                 else:
                     blocks[j]['indent'] -= adjustment
                     j += 1