Skip to content

Commit

Permalink
added version check
Browse files Browse the repository at this point in the history
  • Loading branch information
BlackLotus committed Mar 29, 2019
1 parent 2444517 commit d806305
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rdmo/core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ def render_to_format(request, format, title, template_src, context):
# use reference document for certain file formats
refdoc = set_export_reference_document(format)
if refdoc is not None and (format == 'docx' or format == 'odt'):
if pypandoc.get_pandoc_version().startswith("1"):
refdoc_param = '--reference-' + format + '=' + refdoc
args.extend([refdoc_param])
else:
refdoc_param = '--reference-doc=' + refdoc
args.extend([refdoc_param])

Expand Down

0 comments on commit d806305

Please sign in to comment.