Skip to content

Commit

Permalink
make nil good
Browse files Browse the repository at this point in the history
  • Loading branch information
taojoe committed Dec 18, 2013
1 parent 8fa190b commit d729b9b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion project.clj
@@ -1,4 +1,4 @@
(defproject fleet "0.10.1"
(defproject fleet "0.10.1-dev"
:description "Templating System for Clojure"
:url "http://github.com/Flamefork/fleet"
:license {:name "MIT License"
Expand Down
4 changes: 3 additions & 1 deletion src/fleet/runtime.clj
Expand Up @@ -24,6 +24,8 @@
(screen [s escaping-fn] "Process and collect template string(s)."))

(extend-protocol Screenable
nil
(screen [_ _] nil)
CharSequence
(screen [s f] (raw f (if (raw? f s) s (f s))))
Sequential
Expand All @@ -36,4 +38,4 @@
[escaping-fn]
{:raw (partial raw escaping-fn)
:raw? (partial raw? escaping-fn)
:screen #(screen %1 escaping-fn)})
:screen #(screen %1 escaping-fn)})

0 comments on commit d729b9b

Please sign in to comment.