def clean_markdown ( text ) : result = text if isinstance ( text , str ) : result = '' . join ( BeautifulSoup ( markdown ( text ) , 'lxml' ) . findAll ( text = True ) ) return result
python parse markdown into elements
Parse markdown sintaxt to html .
def clean_markdown(text):
    """
    Parse markdown sintaxt to html.
    """
    result = text

    if isinstance(text, str):
        result = ''.join(
            BeautifulSoup(markdown(text), 'lxml').findAll(text=True))

    return result