Use the new pandoc syntax.
This commit is contained in:
parent
f1bfdc5477
commit
1c82949a0e
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue