def METHOD_NAME(self, text):
    """Parses the contents of a formatted text string into the
    corresponding HTML.
    """
    text = text.replace("\r\n", "\n")
    lines = [("." + line).strip()[1:] for line in text.split("\n")]
    ind = min(
        *(
            [self.indent(line) for line in lines if line != ""]
            + [1000, 1000]
        )
    )
    if ind >= 1000:
        ind = 0
    lines = [line[ind:] for line in lines]
    new_lines = []
    i = 0
    n = len(lines)
    while i < n:
        line = lines[i]
        m = self.indent(line)
        if m > 0:
            if line[m] in "-*":
                i, line = self.parse_list(lines, i)
            else:
                i, line = self.parse_block(lines, i)
            new_lines.append(line)
        else:
            new_lines.append(line)
            i += 1
    text = "\n".join(new_lines)
    paragraphs = [p.strip() for p in text.split("\n\n")]
    for i, paragraph in enumerate(paragraphs):
        if paragraph[:3].lower() != "<p>":
            paragraphs[i] = "<p>%s</p>" % paragraph
    return "\n".join(paragraphs)