

def append_sections_and_synopsises(self, paragraphs):
    new_paragraphs = []
    for line in self.lines:
        match = section_re.match(line)
        if match:
            (hashes, text) = match.groups()
            section = Section(_string_to_rich(text), len(hashes))
            new_paragraphs.append(section)
        elif (line.startswith('=') and new_paragraphs and hasattr(new_paragraphs[(- 1)], 'set_synopsis')):
            new_paragraphs[(- 1)].set_synopsis(line[1:].lstrip())
        else:
            return False
    paragraphs += new_paragraphs
    return True

dataset/ETHPy150Open vilcans/screenplain/screenplain/parsers/fountain.py InputParagraph.append_sections_and_synopsises/original