From f130a9995c6d38dab1c0da31e939386cbd060bb0 Mon Sep 17 00:00:00 2001 From: Jared Forsyth Date: Mon, 29 Apr 2013 20:16:00 -0600 Subject: [PATCH] adding restructuredtext plugin support --- hyde/ext/templates/jinja.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hyde/ext/templates/jinja.py b/hyde/ext/templates/jinja.py index 7e591f6..3d35ebb 100644 --- a/hyde/ext/templates/jinja.py +++ b/hyde/ext/templates/jinja.py @@ -160,6 +160,11 @@ def restructuredtext(env, value): highlight_source = False if hasattr(env.config, 'restructuredtext'): highlight_source = getattr(env.config.restructuredtext, 'highlight_source', False) + extensions = getattr(env.config.restructuredtext, 'extensions', []) + import imp + for extension in extensions: + imp.load_module(extension, *imp.find_module(extension)) + if highlight_source: import hyde.lib.pygments.rst_directive