def _get_html_contents(html):
    """Process a HTML block and detects whether it is a code block,
    a math block, or a regular HTML block."""
    parser = MyHTMLParser()
    parser.feed(html)
    if parser.is_code:
        return ('code', parser.data.strip())
    elif parser.is_math:
        return ('math', parser.data.strip())
    else:
        return '', ''
Process a HTML block and detects whether it is a code block,
    a math block, or a regular HTML block.
ipymd/formats/atlas.py