From a8a228cb23460f9cd70b4a5b2c2be11b4c7b6807 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Thu, 25 May 2017 20:39:24 +0100 Subject: [PATCH] add all of config to context --- md_pdf/build/context.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/md_pdf/build/context.py b/md_pdf/build/context.py index 36ad500..8978051 100644 --- a/md_pdf/build/context.py +++ b/md_pdf/build/context.py @@ -12,10 +12,17 @@ EXTRA_CONTEXT = { def get_context(config, content): + config = config.copy() context = config['context'].copy() - context['title'] = config['title'] - context = dict(context, **EXTRA_CONTEXT, **{ - }) + del config['context'] + context = dict( + config, + **context, + **EXTRA_CONTEXT, + **{ + + } + ) if config.get('show_word_count'): context['word_count'] = word_count(get_plain_text(content)) return context