From f767b5b794b916ce7366e9b2e49735d376cae879 Mon Sep 17 00:00:00 2001 From: Lakshmi Vyasarajan Date: Sat, 19 Feb 2011 12:23:23 +0530 Subject: [PATCH] Used the new to_dict method in expando --- hyde/ext/templates/jinja.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/hyde/ext/templates/jinja.py b/hyde/ext/templates/jinja.py index c1e00ff..e5fa071 100644 --- a/hyde/ext/templates/jinja.py +++ b/hyde/ext/templates/jinja.py @@ -4,6 +4,7 @@ Jinja template utilties """ from hyde.fs import File, Folder +from hyde.model import Expando from hyde.template import HtmlWrap, Template from hyde.site import Resource from hyde.util import getLoggerWithNullHandler, getLoggerWithConsoleHandler @@ -58,7 +59,9 @@ def markdown(env, value): d = {} if hasattr(env.config, 'markdown'): d['extensions'] = getattr(env.config.markdown, 'extensions', []) - d['extension_configs'] = getattr(env.config.markdown, 'extension_configs', {}) + d['extension_configs'] = getattr(env.config.markdown, + 'extension_configs', + Expando({})).to_dict() md = markdown.Markdown(**d) return md.convert(output) @@ -80,7 +83,9 @@ def syntax(env, value, lexer=None, filename=None): lexers.guess_lexer(value)) settings = {} if hasattr(env.config, 'syntax'): - settings = dict(getattr(env.config.syntax, 'options', {})) + settings = getattr(env.config.syntax, + 'options', + Expando({})).to_dict() formatter = formatters.HtmlFormatter(**settings) code = pygments.highlight(value, pyg, formatter)