From 1c82949a0e1a37863d6a4c1967475b3782d573ed Mon Sep 17 00:00:00 2001 From: "Niels G. W. Serup" Date: Tue, 21 Aug 2018 19:16:55 +0200 Subject: [PATCH] Use the new pandoc syntax. --- scripts/transform-file.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/transform-file.py b/scripts/transform-file.py index 435567f..612195f 100755 --- a/scripts/transform-file.py +++ b/scripts/transform-file.py @@ -35,13 +35,13 @@ site_dir = os.path.join(base_dir, 'site') def pandoc(filename): - proc = subprocess.run(['pandoc', '--smart', filename], + proc = subprocess.run(['pandoc', '-f', 'markdown+smart', filename], stdout=subprocess.PIPE) return proc.stdout.decode('utf-8').strip() -def pandoc_stdin(text, from_type): +def pandoc_stdin(text): out = subprocess.Popen( - ['pandoc', '--smart', '-f', from_type], + ['pandoc', '-f', 'markdown+smart'], stdin=subprocess.PIPE, stdout=subprocess.PIPE).communicate(text.encode('utf-8'))[0] return out.decode('utf-8').strip() @@ -115,7 +115,7 @@ def markdown_to_html(input_file, output_dir): md += '[{}]({})\n ~ {}\n\n'.format(ptitle, url, pabstract) bottom = md - content = pandoc_stdin(top + '\n' + bottom, 'markdown') + content = pandoc_stdin(top + '\n' + bottom) else: content = pandoc(input_file)