mercurial/minirst.py
changeset 26170 61124bf8485f
parent 26157 65e41f388970
child 26237 1c6f7cc52da9
equal deleted inserted replaced
26169:ea888285311f 26170:61124bf8485f
   739                               len(section['lines'][1].lstrip(' '))
   739                               len(section['lines'][1].lstrip(' '))
   740                         if bindent >= sindent:
   740                         if bindent >= sindent:
   741                             break
   741                             break
   742                     pointer += 1
   742                     pointer += 1
   743                 if pointer > 1:
   743                 if pointer > 1:
   744                     secs.append(('', secs[-pointer][1] + 1, []))
   744                     blevel = secs[-pointer][1]
       
   745                     if section['type'] != b['type']:
       
   746                         blevel += 1
       
   747                     secs.append(('', blevel, []))
   745             secs[-1][2].append(b)
   748             secs[-1][2].append(b)
   746     return secs
   749     return secs
   747 
   750 
   748 def decorateblocks(blocks, width):
   751 def decorateblocks(blocks, width):
   749     '''generate a list of (section name, line text) pairs for search'''
   752     '''generate a list of (section name, line text) pairs for search'''