def parse(self):
        # reset body
        self.data["body"] = []

        # this is messy - convert to a matchgroup in the future
        for index, line in enumerate(vim.current.buffer[1:]):
            mg = re.match(r"# (?P<label>[^:]+): (?P<value>.*)", line)
            # handle normal attribute
            if mg:
                value = mg.group("value")
                label = mg.group("label").lower()
                if label in self.defaults.keys():
                    if type(self.defaults[label]) == list:
                        self.data[label] = value.split(",")
                    else:
                        self.data[label] = value
            # handle error
            elif re.search(r"^## Comments Issue #%s" % self.number, line):
                # pass the comments to the other section
                self.comments.parse(vim.current.buffer[index+1:-1])
                break
            else: 
                self.data["body"].append(line)

        self.data["body"] = utils.trim_lines(self.data["body"])
dataset/ETHPy150Open jonmorehouse/vimhub/lib/issue.py/Issue.parse/original