@classmethod
def parse_marker(cls, line):
    """
        Returns a pair (prepend, leader) iff the line has a valid leader.
        """
    match_obj = cls.pattern.match(line)
    if match_obj is None:
        return None
    leader = match_obj.group(1)
    content = match_obj.group(0).replace(leader + '\t', leader + '   ', 1)
    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
