From 2633718cee6101d87020147690c7d1c47fca81c6 Mon Sep 17 00:00:00 2001 From: Alexander Schneider Date: Tue, 15 Oct 2019 20:10:38 +0200 Subject: [PATCH 1/3] Flatten sequences returned by join-classes --- src/sablono/util.cljc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sablono/util.cljc b/src/sablono/util.cljc index 4b65239..b66529f 100644 --- a/src/sablono/util.cljc +++ b/src/sablono/util.cljc @@ -65,6 +65,7 @@ (->> classes (into [] (comp (mapcat (fn [x] (if (string? x) [x] (seq x)))) + (flatten) (remove nil?))) (str/join " "))) From 21b68c824cf879439cae38220c6771d161254f3f Mon Sep 17 00:00:00 2001 From: Alexander Schneider Date: Tue, 15 Oct 2019 20:17:50 +0200 Subject: [PATCH 2/3] Fix wrong flatten call --- src/sablono/util.cljc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sablono/util.cljc b/src/sablono/util.cljc index b66529f..db51810 100644 --- a/src/sablono/util.cljc +++ b/src/sablono/util.cljc @@ -65,7 +65,7 @@ (->> classes (into [] (comp (mapcat (fn [x] (if (string? x) [x] (seq x)))) - (flatten) + flatten (remove nil?))) (str/join " "))) From e69bf905a16daa52c318505cfe6b620c1fb04253 Mon Sep 17 00:00:00 2001 From: Alexander Schneider Date: Tue, 15 Oct 2019 20:26:56 +0200 Subject: [PATCH 3/3] Put flatten at the right position in join-classes --- src/sablono/util.cljc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sablono/util.cljc b/src/sablono/util.cljc index db51810..0b9599f 100644 --- a/src/sablono/util.cljc +++ b/src/sablono/util.cljc @@ -65,8 +65,8 @@ (->> classes (into [] (comp (mapcat (fn [x] (if (string? x) [x] (seq x)))) - flatten (remove nil?))) + (flatten) (str/join " "))) #?(:cljs