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.
Got differenciated margins working.
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. Got differenciated margins working.
(calc-inline-margins s)Calculate margins of inline content.
Calculate margins of inline content.
(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}`(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 |