Liking cljdoc? Tell your friends :D

nextjournal.markdown.utils


->zipclj/s

(->zip doc)
source

add-title+tocclj/s

(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`.
sourceraw docstring

add-to-tocclj/s

(add-to-toc doc {:as h :keys [heading-level]})
source

block-formulaclj/s

(block-formula text)
source

current-ancestor-nodesclj/s

(current-ancestor-nodes loc)
source

current-locclj/s

(current-loc {:as ctx :nextjournal.markdown.impl/keys [root]})
source

empty-docclj/s

source

footnote->sidenoteclj/s

(footnote->sidenote {:keys [ref label content]})
source

formulaclj/s

(formula text)
source

handle-close-headingclj/s

(handle-close-heading ctx)
source

handle-text-tokenclj/s

(handle-text-token {:as ctx :keys [text-tokenizers]} text)
source

hashtag-tokenizerclj/s

source

inc-lastclj/s

(inc-last path)
source

insert-sidenote-containersclj/s

(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.
sourceraw docstring

source

into-tocclj/s

(into-toc toc {:as toc-item :keys [heading-level]})
source

nodeclj/s

(node type content attrs top-level)
source

node-with-sidenote-refsclj/s

(node-with-sidenote-refs p-node)
source

normalize-tokenizerclj/s

(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
sourceraw docstring

parse-fence-infoclj/s

(parse-fence-info info-str)
source

ppopclj/s

source

re-groups*clj

(re-groups* m)
source

re-idx-seqclj/s

(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.
sourceraw docstring

set-title-when-missingclj/s

(set-title-when-missing {:as doc :keys [title]} heading)
source

split-by-emojiclj/s

(split-by-emoji s)
source

text->id+emojiclj/s

(text->id+emoji text)
source

text-nodeclj/s

(text-node s)
source

tokenize-text-nodeclj/s

(tokenize-text-node {:as tkz :keys [tokenizer-fn pred doc-handler]}
                    ctx
                    {:as node :keys [text]})
source

update-current-locclj/s

(update-current-loc {:as ctx :nextjournal.markdown.impl/keys [root]} f & args)
source

zdepthclj/s

(zdepth loc)
source

zip?clj/s

source

zopen-nodeclj/s

(zopen-node loc node)
source

zpathclj/s

(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)`
sourceraw docstring

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

× close