Liking cljdoc? Tell your friends :D

clarktown.renderers.list-block


add-to-parentclj

(add-to-parent items item)

Recursively scans items, which can be multiple levels deep, and tries to find a home for item according to its parent ID.

Recursively scans `items`, which can be multiple levels deep,
and tries to find a home for `item` according to its parent ID.
sourceraw docstring

compose-item-treeclj

(compose-item-tree block)

Given a block, composes a data representation of it based on the indentation of each line.

Given a `block`, composes a data representation of it based on
the indentation of each line.
sourceraw docstring

compose-items-with-indent-guidesclj

(compose-items-with-indent-guides block)

Composes a vector of maps from given block that adds a unique ID to each line as well as its indent-n which is used later on to determine hierarchies.

Composes a vector of maps from given `block` that adds a unique
ID to each line as well as its `indent-n` which is used later
on to determine hierarchies. 
sourceraw docstring

compose-items-with-parentsclj

(compose-items-with-parents block)

Composes a 1-level list of items from block and adds parent information to each if they belong to another item. The result of this is used to build the final data tree.

Composes a 1-level list of items from `block` and adds parent
information to each if they belong to another item. The result
of this is used to build the final data tree.
sourceraw docstring

find-parent-idclj

(find-parent-id items index)

Assuming a 1-level items, will attempt to find the parent id of the item at given index. Will return nil otherwise.

Assuming a 1-level `items`, will attempt to find the parent `id`
of the item at given `index`. Will return `nil` otherwise.
sourceraw docstring

renderclj

(render block _ _)

Renders the list block

Renders the list block
sourceraw docstring

render-itemsclj

(render-items items)

Renders an ordered/un-ordered list hierarchy from given items.

Renders an ordered/un-ordered list hierarchy from given `items`.
sourceraw docstring

string->indent-nclj

(string->indent-n str)

Returns the indentation count from left of str, which must be in spaces and not tabs.

Returns the indentation count from left of `str`, which must be
in spaces and not tabs.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close