|
|
@ -81,8 +81,8 @@ def md_to_html(md_pad_content, name): |
|
|
|
protocol = urlparse(request.base_url).scheme + "://" |
|
|
|
hostname = urlparse(request.base_url).netloc |
|
|
|
domain = protocol + hostname |
|
|
|
template_url = f"{ domain }{ APP.config['APPLICATION_ROOT'] }{ name }/template.html" |
|
|
|
md_url = f"{ domain }{ APP.config['APPLICATION_ROOT'] }{ name }/pad.md" |
|
|
|
template_url = f"{ domain }{ APP.config['APPLICATION_ROOT'] }/{ name }/template.html" |
|
|
|
md_url = f"{ domain }{ APP.config['APPLICATION_ROOT'] }/{ name }/pad.md" |
|
|
|
# html = pypandoc.convert_text(md_pad_content, 'html', format='md', extra_args=[f'--template={ template_url }', '--standalone']) |
|
|
|
result = subprocess.run(["pandoc", "--from", "markdown", "--to", "html", "--template", f"{ template_url }", md_url], capture_output=True, text=True) |
|
|
|
html = result.stdout |
|
|
|