Fork me on GitHub
#beginners
<
2016-07-29
>
dimovich13:07:19

I have an svg file that I want to inject into the html using enlive...

dimovich13:07:24

how can I do it?

dimovich13:07:30

slurping the svg file seem to mangle it

martinklepsch14:07:06

@dimovich: you can either parse the HTML and add it that way or use html-content as described in this SO answer: http://stackoverflow.com/questions/12681759/how-to-add-a-string-containing-html-with-clojure-enlive

devo17:07:27

@scriptor: Thanks!

codonnell18:07:43

@devo: I might be misunderstanding your function's purpose, but I think your append-row could be rewritten (defn append-row [arr row] (mapv conj arr row))

devo18:07:04

@codonnell: yea, I rewrote with mapv. Didn't realize it was an option but works as intended.