Liking cljdoc? Tell your friends :D

atlassian.jira.adf

Atlassian Document Format (ADF) helpers.

Jira Cloud v3 takes and returns rich text as ADF — a nested JSON document tree, not a string. Two directions live here:

  • adf->text : best-effort flatten an ADF value to compact plain text for reading (lossy: tables/media/mentions collapse to text).
  • doc / text->adf / paragraph : build minimal valid ADF documents for write paths (create issue description, add comment, etc.).

Full-fidelity ADF is always reachable by passing your own document map to the endpoint functions; these helpers just cover the common cases.

Atlassian Document Format (ADF) helpers.

Jira Cloud v3 takes and returns rich text as ADF — a nested JSON document
tree, not a string. Two directions live here:

 - `adf->text`  : best-effort flatten an ADF value to compact plain text for
                  reading (lossy: tables/media/mentions collapse to text).
 - `doc` / `text->adf` / `paragraph` : build minimal valid ADF documents for
                  write paths (create issue description, add comment, etc.).

Full-fidelity ADF is always reachable by passing your own document map to the
endpoint functions; these helpers just cover the common cases.
raw docstring

adf->textclj

(adf->text v)

Best-effort flattening of an ADF value to compact plain text. Accepts a string (returned as-is), an ADF map, or nil. Lossy by design: tables, media, mentions, and panels collapse to their text content.

Best-effort flattening of an ADF value to compact plain text. Accepts a string
(returned as-is), an ADF map, or nil. Lossy by design: tables, media,
mentions, and panels collapse to their text content.
sourceraw docstring

docclj

(doc & blocks)

Wrap ADF block nodes in a top-level ADF document. Pass block-node maps (e.g. (paragraph ...)); a lone string is treated as a single paragraph.

Wrap ADF block nodes in a top-level ADF document. Pass block-node maps (e.g.
`(paragraph ...)`); a lone string is treated as a single paragraph.
sourceraw docstring

paragraphclj

(paragraph s)

An ADF paragraph node wrapping a single run of plain text.

An ADF paragraph node wrapping a single run of plain text.
sourceraw docstring

text->adfclj

(text->adf s)

Build a minimal valid ADF document from a plain string, splitting on blank lines into paragraphs. Convenience for the common 'I just want to write some text' case on create-issue / add-comment.

Build a minimal valid ADF document from a plain string, splitting on blank
lines into paragraphs. Convenience for the common 'I just want to write some
text' case on create-issue / add-comment.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close