From ac1659a1cc156241f1b4433e99732c0075ff72fc Mon Sep 17 00:00:00 2001 From: Asko Nõmm Date: Mon, 20 Oct 2025 11:31:18 +0300 Subject: Improve README --- README.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index c04c81f..78d7700 100644 --- a/README.md +++ b/README.md @@ -88,11 +88,11 @@ Easily walk and transform the node tree with the `dompa.nodes/traverse` helper. (traverse nodes-data update-text-value) ``` -> The function you provide to `traverse` dictates the outcome for each node: -> -> * To **update a node**, return the modified node. -> * To **keep a node unchanged**, return the original node. -> * To **remove a node**, return `nil`. +The function you provide to `traverse` dictates the outcome for each node: + +* To **update a node**, return the modified node. +* To **keep a node unchanged**, return the original node. +* To **remove a node**, return `nil`. ----- @@ -118,7 +118,7 @@ For a more idiomatic and concise way to build node structures, use the `$` helpe ($ "hello world")) ``` -Nodes can be nested. Children are passed as the second argument (if no attributes) or the third argument (if attributes are present). +All nodes (except text nodes) can be nested. Children are passed as the second argument (if no attributes) or the third argument (if attributes are present). ----- @@ -145,7 +145,7 @@ It works seamlessly with standard Clojure functions like `map`: (:require [dompa.nodes :refer [defhtml $]])) (def names ["john" "mike" "jenna"]) - +s (defhtml name-list [] ($ :ul (map #($ :li %) names))) @@ -154,7 +154,7 @@ It works seamlessly with standard Clojure functions like `map`: ;;=> "" ``` -> **Note for ClojureScript:** Remember to use `:refer-macros` instead of `:refer` when requiring `defhtml`. +**Note for ClojureScript:** Remember to use `:refer-macros` instead of `:refer` when requiring `defhtml`. ----- @@ -162,7 +162,7 @@ It works seamlessly with standard Clojure functions like `map`: Dompa also exposes the lower-level functions that power the parsing process. You can use these for more granular control: - * `dompa.html/->coordinates`: Transforms an HTML string into coordinate data. - * `dompa.coordinates/compose`: Creates range positions of nodes from an HTML string. - * `dompa.coordinates/unify`: Merges coordinates for the same block nodes. - * `dompa.coordinates/->nodes`: Transforms coordinate data into a final node tree. +* `dompa.coordinates/compose`: Creates range positions of nodes from an HTML string. +* `dompa.coordinates/unify`: Merges coordinates for the same block nodes. +* `dompa.coordinates/->nodes`: Transforms coordinate data into a final node tree. +* `dompa.html/->coordinates`: Transforms an HTML string into coordinate data (result of `dompa.coordinates/compose` and `dompa.coordinates/unify`). \ No newline at end of file -- cgit v1.2.3