code: def parse_marker(cls, line):
          
          match_obj = cls.pattern.match(line)
          if match_obj is None:
              return None        # no valid leader
          leader = match_obj.group(1)
          content = match_obj.group(0).replace(leader+'\t', leader+'   ', 1)
          # reassign prepend and leader
          prepend = len(content)
          if prepend == len(line.rstrip('\n')):
              prepend = match_obj.end(1) + 1
          else:
              spaces = match_obj.group(2)
              if spaces.startswith('\t'):
                  spaces = spaces.replace('\t', '   ', 1)
              spaces = spaces.replace('\t', '    ')
              n_spaces = len(spaces)
              if n_spaces > 4:
                  prepend = match_obj.end(1) + 1
          return prepend, leader
docs: Returns a pair (prepend, leader) iff the line has a valid leader.