From 82fc33a1c4fcb9f42d4558da7f955b070c2c5fa5 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Thu, 1 Jun 2017 15:42:32 +0100 Subject: [PATCH] Null check TOCs --- md_pdf/build/pdf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/md_pdf/build/pdf.py b/md_pdf/build/pdf.py index b498b5d..cd1d9a7 100644 --- a/md_pdf/build/pdf.py +++ b/md_pdf/build/pdf.py @@ -49,6 +49,6 @@ def export_pdf(content, config): os.path.join(os.path.abspath(config['output_dir']), 'output.pdf'), options=PDF_OPTIONS, cover=FILE_NAME_FORMAT.format('cover'), - toc=TOC_OPTIONS if config['toc'] else {}, + toc=TOC_OPTIONS if config.get('toc') else {}, cover_first=True )