File size: 285 Bytes
466d5bb
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
import mistune
from mistune.plugins.table import table
import re


def md_to_html(md_text):
    renderer = mistune.HTMLRenderer()
    markdown_renderer = mistune.Markdown(renderer, plugins=[table])
    html_content = markdown_renderer(md_text)
    return html_content.replace('\n', '')