Liking cljdoc? Tell your friends :D
Clojure only.

std.pretty.color


-documentcljmultimethod

Constructs a pretty print document, which may be colored if :print-color is true.

(-document printer/+defaults+ :string "hello there") => [:span [:pass "[36m"] "hello there" [:pass "[0m"]]

(-document printer/+defaults+ :keyword :something) => [:span [:pass "[34m"] :something [:pass "[0m"]]

Constructs a pretty print document, which may be colored if `:print-color` is true.

(-document printer/+defaults+ :string "hello there")
=> [:span [:pass ""] "hello there" [:pass ""]]

(-document printer/+defaults+ :keyword :something)
=> [:span [:pass ""] :something [:pass ""]]
raw docstring

-textcljmultimethod

Produces text colored according to the active color scheme. This is mostly useful to clients which want to produce output which matches data printed by Puget, but which is not directly printed by the library. Note that this function still obeys the :print-color option.

(-text printer/+defaults+ :string "hello there") => "[36mhello there[0m"

(-text printer/+defaults+ :keyword :hello) => "[34m:hello[0m"

Produces text colored according to the active color scheme. This is mostly
useful to clients which want to produce output which matches data printed by
Puget, but which is not directly printed by the library. Note that this
function still obeys the `:print-color` option.

(-text printer/+defaults+ :string "hello there")
=> "hello there"

(-text printer/+defaults+ :keyword :hello)
=> ":hello"
raw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close