Liking cljdoc? Tell your friends :D

nextjournal.markdown.parser


->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

apply-tokenclj/smultimethod

source

apply-tokensclj/s

(apply-tokens doc tokens)
source

assign-node-id+emojiclj/s

(assign-node-id+emoji {:as doc
                       :nextjournal.markdown.parser/keys [id->index path]
                       :keys [text->id+emoji-fn]})
source

block-formulaclj/s

(block-formula text)
source

close-nodeclj/s

(close-node doc)
source

current-ancestor-nodesclj/s

(current-ancestor-nodes {:as doc :nextjournal.markdown.parser/keys [path]})

Given an open parsing context doc, returns the list of ancestors of the node last parsed into the document, up to but not including the top document.

Given an open parsing context `doc`, returns the list of ancestors of the node last parsed into the document, up to but
not including the top document.
sourceraw docstring

current-parent-nodeclj/s

(current-parent-node {:as doc :nextjournal.markdown.parser/keys [path]})

Given an open parsing context doc, returns the parent of the node which was last parsed into the document.

Given an open parsing context `doc`, returns the parent of the node which was last parsed into the document.
sourceraw docstring

empty-docclj/s

source

empty-text-node?clj/s

(empty-text-node? {text :text t :type})
source

flatten-tokensclj/s

(flatten-tokens tokens)
source

footnote->sidenoteclj/s

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

footnote-refclj/s

(footnote-ref ref label)
source

formulaclj/s

(formula text)
source

get-in*clj/s

source

hashtag-tokenizerclj/s

source

hlevelclj/s

(hlevel {:as _token hn :tag})
source

inc-lastclj/s

(inc-last path)
source

insert-sidenote-containersclj/s

(insert-sidenote-containers
  {:as doc :nextjournal.markdown.parser/keys [path] :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

open-nodeclj/s

(open-node doc type)
(open-node doc type attrs)
(open-node doc type attrs top-level)
source

pairs->kmapclj/s

(pairs->kmap pairs)
source

parseclj/s

(parse tokens)
(parse doc tokens)

Takes a doc and a collection of markdown-it tokens, applies tokens to doc. Uses an emtpy doc in arity 1.

Takes a doc and a collection of markdown-it tokens, applies tokens to doc. Uses an emtpy doc in arity 1.
sourceraw docstring

parse-fence-infoclj/s

(parse-fence-info info-str)
source

ppopclj/s

source

push-nodeclj/s

(push-node {:as doc :nextjournal.markdown.parser/keys [path]} node)
source

push-nodesclj/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

section-atclj/s

(section-at {:as doc :keys [content]} [_ pos :as path])
source

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 text)
source

tokenize-text-nodeclj/s

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

update*clj/s

source

update-currentclj/s

(update-current {:as doc path :nextjournal.markdown.parser/path} fn & args)
source

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

× close