From 6b1359344078c484aa4766bd30a4abd7d5c04a73 Mon Sep 17 00:00:00 2001 From: mb Date: Wed, 29 Nov 2023 19:09:18 +0100 Subject: [PATCH] messay slash situation, to be cleaned up later --- octomode.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/octomode.py b/octomode.py index 0a97c51..b3159ae 100755 --- a/octomode.py +++ b/octomode.py @@ -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