(add-title+toc {:as doc :keys [content]})
Computes and adds a :title and a :toc to the document-like structure doc
which might have not been constructed by means of parse
.
Computes and adds a :title and a :toc to the document-like structure `doc` which might have not been constructed by means of `parse`.
(insert-sidenote-containers {:as doc :keys [footnotes]})
Handles footnotes as sidenotes.
Takes and returns a parsed document. When the document has footnotes, wraps every top-level block which contains footnote references
with a :footnote-container
node, into each of such nodes, adds a :sidenote-column
node containing a :sidenote
node for each found ref.
Renames type :footnote-ref
to `:sidenote-ref.
Handles footnotes as sidenotes. Takes and returns a parsed document. When the document has footnotes, wraps every top-level block which contains footnote references with a `:footnote-container` node, into each of such nodes, adds a `:sidenote-column` node containing a `:sidenote` node for each found ref. Renames type `:footnote-ref` to `:sidenote-ref.
(normalize-tokenizer {:as tokenizer
:keys [doc-handler pred handler regex tokenizer-fn]})
Normalizes a map of regex and handler into a Tokenizer
Normalizes a map of regex and handler into a Tokenizer
(re-idx-seq re text)
Takes a regex and a string, returns a seq of triplets comprised of match groups followed by indices delimiting each match.
Takes a regex and a string, returns a seq of triplets comprised of match groups followed by indices delimiting each match.
(tokenize-text-node {:as tkz :keys [tokenizer-fn pred doc-handler]}
ctx
{:as node :keys [text]})
(update-current-loc {:as ctx :nextjournal.markdown.impl/keys [root]} f & args)
(zpath loc)
Given a document zipper location loc
returns a vector corresponding to the path of node at loc
suitable for get-in from root. That is (= (z/node loc) (get-in (z/root loc) (zpath loc)
Given a document zipper location `loc` returns a vector corresponding to the path of node at `loc` suitable for get-in from root. That is `(= (z/node loc) (get-in (z/root loc) (zpath loc)`
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close