Skip to content

Commit

Permalink
Fix reflection warnings in puget.color.html.
Browse files Browse the repository at this point in the history
  • Loading branch information
greglook committed Feb 28, 2015
1 parent 65c0ff5 commit e8b4e2f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/puget/color/html.clj
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
(ns puget.color.html
"This namespace defines methods for the :html-inline
and :html-classes :color-markup options."
"This namespace defines methods for the `:html-inline` and `:html-classes`
otptions for `:color-markup`."
(:require
[clojure.string :as str]
[puget.color :as color]))


(def style-attribute
"Map from keywords usable in a color-scheme value to vectors
representing css style attributes"
Expand Down Expand Up @@ -57,11 +58,11 @@
"Escapes special characters into fipp :span/:escaped nodes"
[text]
(let [escaped-text (escape-html-text text)
spans (.split escaped-text "(?=&)")]
spans (str/split escaped-text #"(?=&)")]
(reduce (fn [acc span]
(case (first span)
nil acc
\& (let [[escaped span] (.split span "(?<=;)" 2)
\& (let [[escaped span] (str/split span #"(?<=;)" 2)
acc (conj acc [:escaped escaped])]
(if (seq span)
(conj acc span)
Expand Down

0 comments on commit e8b4e2f

Please sign in to comment.