Use EDN to read, rather than read-string.

This commit is contained in:
Charlotte Allen 2020-02-03 13:00:10 -08:00
parent a091a377b0
commit 1c43b84d68
1 changed files with 2 additions and 1 deletions

View File

@ -3,6 +3,7 @@
[shapey-shifty.posts.core :as core]
[shapey-shifty.authors.author-core :as author]
[clojure.java.io :as io]
[clojure.edn :as edn]
))
(def post-filename "post.edn")
@ -40,7 +41,7 @@
(defn read-post
([file]
(when (.exists file)
(-> file slurp read-string assoc-author)))
(-> file slurp edn/read-string assoc-author)))
([dt-path n]
(let [path (format "%s/%s/%s/%s" base-posts-path (pathmap-to-path dt-path) n post-filename)
f (io/file path)]