def parse_markdown(md):
    eq_pattern = '(\\$.+?\\$)'
    return re.sub(eq_pattern, parse_equation, md)
def parse_markdown(md):
    eq_pattern = '(\\$.+?\\$)'
    return re.sub(eq_pattern, parse_equation, md)