             [leiningen.helper :as h]
             [de.sveri.clojure.commons.files.faf :as faf]
             [selmer.parser :as selm])
-  (:import (clojure.lang Seqable Keyword)))
+  (:import (clojure.lang Seqable Keyword)
+           (java.lang System)))
+
+(def line-sep (System/lineSeparator))
+
+(t/ann insert-line-endings [Seqable -> String])
+(defn- hicc->html [s]
+  (-> s
+      (hicc/html)
+      (clojure.string/replace #"/div>" (str "/div>" line-sep))))
 
 (t/ann get-and-create-templ-fp-path! [String String pt/entity-description -> String])
 (defn- get-and-create-templ-fp-path! [filename templ-path dataset]

        btns [[:button.btn.btn-primary {:type "submit"} (str "Add " action)]]]
    (vec (concat form af-token form-groups btns))))

(t/ann wrap-with-selmer-extend [String -> String])
(defn wrap-with-selmer-extend [form]
  (str "{% extends \"base.html\" %}\r\n{% block content %}\r\n" form "\r\n{% endblock %}"))

; create
(t/ann create-html [pt/entity-description -> String])

        rest-cols (rest san-cols)
        hicc-rest-cols (map (fn [col] [:td (str "{{" e-name "." (conv-col-name col) "}}")]) rest-cols)
        hicc-delete-col [:td [:a.btn.btn-primary {:href (str "/" e-name "/delete/{{" e-name ".uuid}}")} "Delete"]]]
    (str (hicc->html hicc-first-col) (str line-sep "\t\t\t\t") (hicc->html hicc-rest-cols) (str line-sep "\t\t\t\t")
         (hicc->html hicc-delete-col))))

(t/ann index-html [pt/entity-description -> String])
(defn index-html [dataset]
