(ensure-indent text width)
Helper which ensures that the argument text is indented at least by width. Attempts to give a minimal indentation rather than simply indenting the text to width.
Helper which ensures that the argument text is indented at least by width. Attempts to give a minimal indentation rather than simply indenting the text to width.
(lift-indentation [op meta & children :as text])
Helper which attempts to rewrite a given node so that it reflects the indentation of its children.
Ex. [:block {} [:indent {} "foo"]] -> [:indent {} [:block {} "foo"]]
Helper which attempts to rewrite a given node so that it reflects the indentation of its children. Ex. [:block {} [:indent {} "foo"]] -> [:indent {} [:block {} "foo"]]
(text->paragraphs text)
(λ String) → (Seq String)
Walks the input string, attempting to detect breaks between paragraphs and returning a sequence of strings representing individual paragraphs.
(λ String) → (Seq String) Walks the input string, attempting to detect breaks between paragraphs and returning a sequence of strings representing individual paragraphs.
(unindent [op {width :width :as meta} & children :as text] indent)
Helper which attempts to rewrite a tree to remove indent
levels
of indentation. Note that negative indentation is not supported.
Helper which attempts to rewrite a tree to remove `indent` levels of indentation. Note that negative indentation is not supported.
(wrap-lines size text)
(λ Num → String) → String
Wraps the input text to the specified column width by words, returning the wrapped text as a single string.
(λ Num → String) → String Wraps the input text to the specified column width by words, returning the wrapped text as a single string.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close