From e1812476f08bf92f641ba9178c3bcd70ec80de2b Mon Sep 17 00:00:00 2001 From: gered Date: Sat, 15 Nov 2014 12:01:16 -0500 Subject: [PATCH] add :auto-convert-map-keywords option and apply to context maps --- src/clj_pebble/core.clj | 4 +++- src/clj_pebble/options.clj | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/clj_pebble/core.clj b/src/clj_pebble/core.clj index 27c359e..944d783 100644 --- a/src/clj_pebble/core.clj +++ b/src/clj_pebble/core.clj @@ -57,7 +57,9 @@ (defn- prepare-context-map [context] (if context - (stringify-keys context) + (if (:auto-convert-map-keywords @options) + (stringify-keys context) + context) {})) (defn- render-template [^String template context] diff --git a/src/clj_pebble/options.clj b/src/clj_pebble/options.clj index e300b35..edf3408 100644 --- a/src/clj_pebble/options.clj +++ b/src/clj_pebble/options.clj @@ -2,4 +2,5 @@ (defonce options (atom - {:cache true})) \ No newline at end of file + {:cache true + :auto-convert-map-keywords true})) \ No newline at end of file