This namespace works on hiccup data structures.
There is a lot of infinite sequences, that can make debugging a bit annoying. Consider using html-to-md.debug/no-infinity to reduce output.
This namespace works on hiccup data structures. There is a lot of infinite sequences, that can make debugging a bit annoying. Consider using html-to-md.debug/no-infinity to reduce output.
(arrange all-elements)The final function converting the intermediate data structure representing markdown and converting it to strings.
The final function converting the intermediate data structure representing markdown and converting it to strings.
(avoid-complex-links url flow-elements)This hairy function manages complex HTML content wrapped in a link. Instead of trying to wrap a markdown link around all of it, it references the link in the beginning, then insert all the complex content, then mentions that the link is no longer being referenced.
This hairy function manages complex HTML content wrapped in a link. Instead of trying to wrap a markdown link around all of it, it references the link in the beginning, then insert all the complex content, then mentions that the link is no longer being referenced.
(calc-inline-margins s)Calculate margins of inline content (CharSequence).
Calculate margins of inline content (`CharSequence`).
(calc-margins spacing inherited-margins first? last?)Takes element margins and possible inherited margins along with the position of the element.
Takes element margins and possible inherited margins along with the position of the element.
(child-elements [_tag attr & elements :as _element])Since hiccup attr(ibutes) are optional sometimes the position actually contain a child node instead, that needs to be re-attached.
Since hiccup attr(ibutes) are optional sometimes the position actually contain a child node instead, that needs to be re-attached.
(decode-html-entities s)Reverses escaping of HTML entities done during HTML->Hiccup.
Reverses escaping of HTML entities done during HTML->Hiccup.
(has-content? element)Whether an element has relevant content for the output.
Relies on correct trimming of elements.
Most goes through as-flow but tags like :pre should preserve whitespace.
Whether an element has relevant content for the output. Relies on correct trimming of elements. Most goes through `as-flow` but tags like `:pre` should preserve whitespace.
(join element-a element-b)Takes two flow elements and joins them into one single flow element.
Supports nil to represent nothing instead of an inline element.
Does not support weird elements like {:text "some text"}
or {:left 1 :right 0 :text nil}
Takes two `flow` elements and joins them into one single `flow` element.
Supports `nil` to represent nothing instead of an `inline` element.
Does not support weird elements like `{:text "some text"}`
or `{:left 1 :right 0 :text nil}`(render-text prefix-seqs text)Takes prefix-seq (which can be empty) together with a text string,
and returns the text with any provided prefix(s).
Also, HTML entities encoded by hiccup are cleaned up (reversed).
Takes `prefix-seq` (which can be empty) together with a text string, and returns the text with any provided prefix(s). Also, HTML entities encoded by hiccup are cleaned up (reversed).
(skip-first colls)Takes a vector of collections and skips the first element in ALL collections.
Takes a vector of collections and skips the first element in ALL collections.
(splice all-elements)Simplifies the intermediate Markdown structure by 'joining' all inline content. Empty elements not relevant for spacing are dropped.
Simplifies the intermediate Markdown structure by 'joining' all inline content. Empty elements not relevant for spacing are dropped.
(unfold prefix-seqs inherited-margins all-elements)Flatten the intermediate Markdown structure. The returned value only needs to have vertical spacing applied and prefixed every line.
prefix-seqs MUST be a vector at all times to maintain correct indenting.
Flatten the intermediate Markdown structure. The returned value only needs to have vertical spacing applied and prefixed every line. `prefix-seqs` MUST be a vector at all times to maintain correct indenting.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |