diff options
Diffstat (limited to 'src/dompa/html.cljc')
| -rw-r--r-- | src/dompa/html.cljc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/dompa/html.cljc b/src/dompa/html.cljc new file mode 100644 index 0000000..6268fa0 --- /dev/null +++ b/src/dompa/html.cljc @@ -0,0 +1,17 @@ +(ns dompa.html + (:require + [dompa.coordinates :as coordinates])) + +(defn ->coordinates + "Transform a `html` string into a vector of coordinates + indicating where an HTML node ends and begins." + [html] + (->> coordinates/compose + (coordinates/unify html))) + +(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 |
