From b3e4a99fb7b0a4d9da84ab37f26f66087e90d03a Mon Sep 17 00:00:00 2001 From: Zahari Date: Tue, 14 Nov 2017 00:43:37 +0100 Subject: [PATCH] Update to pandoc 2.0 Pandoc 2.0 was recently released and propagated to conda forge. It has a change that is breaking for us in that it removes the "smart mode" which is instead a "smart extension". --- conda-recipe/meta.yaml | 2 +- src/reportengine/report.py | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml index 3c92dd0..97543d6 100644 --- a/conda-recipe/meta.yaml +++ b/conda-recipe/meta.yaml @@ -19,7 +19,7 @@ requirements: - pygments - blessings - curio - - pandoc + - pandoc=2 test: requires: diff --git a/src/reportengine/report.py b/src/reportengine/report.py index 6fe85a6..0aa3e5c 100644 --- a/src/reportengine/report.py +++ b/src/reportengine/report.py @@ -286,9 +286,13 @@ def report(template_text, report_style, output_path, args = ['pandoc', str(path), *meta_args, '-o', str(pandoc_path), - '-s' ,'-S' ,'--toc', + '-s' ,'--toc', #http://stackoverflow.com/questions/39220389/embed-indented-html-in-markdown-with-pandoc - '-f', 'markdown+raw_html', + '-f', + #TODO: Enable +smart when we can rely on pandoc 2.0 + #'markdown+raw_html+smart', + 'markdown+raw_html', + '--to', 'html5', '--css', report_style, *template_args,