diff options
Diffstat (limited to 'src/dompa')
| -rw-r--r-- | src/dompa/coordinates.cljc | 2 | ||||
| -rw-r--r-- | src/dompa/html.cljc | 10 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/dompa/coordinates.cljc b/src/dompa/coordinates.cljc index 3584dc9..abaf233 100644 --- a/src/dompa/coordinates.cljc +++ b/src/dompa/coordinates.cljc @@ -149,7 +149,7 @@ (if (str/starts-with? html "<") (->> (subs html 1) (take-while #(not (contains? #{\space \>} %))) - (reduce str) + (apply str) keyword) :dompa/text)) diff --git a/src/dompa/html.cljc b/src/dompa/html.cljc index 6268fa0..cea7b69 100644 --- a/src/dompa/html.cljc +++ b/src/dompa/html.cljc @@ -6,12 +6,14 @@ "Transform a `html` string into a vector of coordinates indicating where an HTML node ends and begins." [html] - (->> coordinates/compose - (coordinates/unify html))) + (->> html + coordinates/compose + coordinates/unify)) (defn ->nodes "Transform a `html` string into a tree of nodes, each representing one HTML node and its children." [html] - (->> (->coordinates html) - (coordinates/->nodes html)))
\ No newline at end of file + (-> html + ->coordinates + coordinates/->nodes))
\ No newline at end of file |
