weavejester / comb

Clojure templating library
68 stars 5 forks source link

template/fn with multiple values #5

Open dAnjou opened 5 years ago

dAnjou commented 5 years ago

Hi,

is it possible to pass multiple values to a template/fn?

I tried:

(template/fn [icon name url] "<%= icon %> [**<%= name %>**](<%= url %>)")

But it says:

clojure.lang.ArityException: Wrong number of args (3) passed to: comb.template/fn
weavejester commented 5 years ago

Can you elaborate? I can't reproduce:

user=> (require '[comb.template :as template])
nil
user=> (def t (template/fn [icon name url] "<%= icon %> [**<%= name %>**](<%= url %>)"))
#'user/t
user=> (t "a" "b" "c")
"a [**b**](c)"