Fix bug with rewrite-href function
This commit is contained in:
parent
bcd841d3df
commit
1abc4c6137
1 changed files with 3 additions and 3 deletions
|
@ -14,11 +14,11 @@
|
||||||
|
|
||||||
(defn rewrite-hrefs
|
(defn rewrite-hrefs
|
||||||
"Injects the blog prefix in front of any local links
|
"Injects the blog prefix in front of any local links
|
||||||
|
|
||||||
ex. <img src='/img/cryogen.png'/> becomes <img src='/blog/img/cryogen.png'/>"
|
ex. <img src='/img/cryogen.png'/> becomes <img src='/blog/img/cryogen.png'/>"
|
||||||
[blog-prefix text]
|
[blog-prefix text]
|
||||||
(if-not (s/blank? blog-prefix)
|
(if-not (s/blank? blog-prefix)
|
||||||
(clojure.string/replace text #"href=.?/|src=.?/" #(str (subs % 0 (dec (count %))) "/" blog-prefix "/"))))
|
|
||||||
|
(clojure.string/replace text #"href=.?/|src=.?/" #(str (subs % 0 (dec (count %))) blog-prefix "/"))))
|
||||||
|
|
||||||
(defn markups
|
(defn markups
|
||||||
"Return a vector of Markup implementations. This is the primary entry point
|
"Return a vector of Markup implementations. This is the primary entry point
|
||||||
|
|
Loading…
Reference in a new issue