diff --git a/.travis.yml b/.travis.yml index 4ce7453..ed3e339 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,10 @@ language: clojure -lein: lein2 -script: lein2 all test +lein: lein +script: lein all test before_install: - git submodule update --init --recursive jdk: - - openjdk6 - openjdk7 + - openjdk8 - oraclejdk7 + - oraclejdk8 diff --git a/project.clj b/project.clj index 97b9dc3..f41d8d8 100644 --- a/project.clj +++ b/project.clj @@ -1,16 +1,15 @@ -(defproject de.ubercode.clostache/clostache "1.5.0-SNAPSHOT" +(defproject de.ubercode.clostache/clostache "1.5.0" :min-lein-version "2.0.0" :description "{{ mustache }} for Clojure" :url "http://github.com/fhd/clostache" :license {:name "GNU Lesser General Public License 2.1" :url "http://www.gnu.org/licenses/lgpl-2.1.txt" :distribution :repo} - :dependencies [[org.clojure/clojure "1.5.0"] - [org.clojure/core.incubator "0.1.2"]] + :dependencies [[org.clojure/clojure "1.9.0"]] :profiles {:dev {:dependencies [[org.clojure/data.json "0.1.2"] [jline/jline "0.9.94"]] :resource-paths ["test-resources"]} - :1.5 {:dependencies [[org.clojure/clojure "1.5.0"]]}} + :1.5 {:dependencies [[org.clojure/clojure "1.9.0"]]}} :repositories {"clojure-releases" "http://build.clojure.org/releases"} :aliases {"all" ["with-profile" "dev:dev,1.5"]} :global-vars {*warn-on-reflection* true}) diff --git a/src/clostache/parser.clj b/src/clostache/parser.clj index f91d30c..813ebb8 100644 --- a/src/clostache/parser.clj +++ b/src/clostache/parser.clj @@ -1,8 +1,6 @@ (ns clostache.parser "A parser for mustache templates." - (:use [clojure.string :only (split)] - [clojure.core.incubator :only (seqable?)]) - (:refer-clojure :exclude (seqable?)) + (:use [clojure.string :only (split)]) (:require [clojure.java.io :as io] [clojure.string :as str]) (:import java.util.regex.Matcher)) @@ -334,12 +332,14 @@ (if section-data (if (fn? section-data) (let [result (section-data (:body section))] - (if (fn? result) + (if (fn? result) (result #(render-template % data partials)) result)) (let [section-data (cond (sequential? section-data) section-data (map? section-data) [section-data] - (seqable? section-data) (seq section-data) + (and + (seqable? section-data) + (not (string? section-data))) (seq section-data) :else [{}]) section-data (if (map? (first section-data)) section-data