mercurial/minirst.py
changeset 15102 a7e375d087f6
parent 15039 c981f4a9ea74
child 15121 0ad0ebe67815
equal deleted inserted replaced
15101:a21ccf4412d5 15102:a7e375d087f6
   237                 pruned.append(containertype)
   237                 pruned.append(containertype)
   238 
   238 
   239             # Always delete "..container:: type" block
   239             # Always delete "..container:: type" block
   240             del blocks[i]
   240             del blocks[i]
   241             j = i
   241             j = i
       
   242             i -= 1
   242             while j < len(blocks) and blocks[j]['indent'] > indent:
   243             while j < len(blocks) and blocks[j]['indent'] > indent:
   243                 if prune:
   244                 if prune:
   244                     del blocks[j]
   245                     del blocks[j]
   245                     i -= 1 # adjust outer index
       
   246                 else:
   246                 else:
   247                     blocks[j]['indent'] -= adjustment
   247                     blocks[j]['indent'] -= adjustment
   248                     j += 1
   248                     j += 1
   249         i += 1
   249         i += 1
   250     return blocks, pruned
   250     return blocks, pruned