Merge pull request #59 from ponkore/rewrite-hrefs-fix

Fix #58
This commit is contained in:
Dmitri Sotnikov 2016-01-10 10:22:20 -05:00
commit a95b58bd00

View file

@ -16,8 +16,8 @@
"Injects the blog prefix in front of any local links
ex. <img src='/img/cryogen.png'/> becomes <img src='/blog/img/cryogen.png'/>"
[blog-prefix text]
(if-not (s/blank? blog-prefix)
(if (s/blank? blog-prefix)
text
(clojure.string/replace text #"href=.?/|src=.?/" #(str (subs % 0 (dec (count %))) blog-prefix "/"))))
(defn markups