Function: cider--rich-content-fallback-string

cider--rich-content-fallback-string is a byte-compiled function defined in cider-eval.el.

Signature

(cider--rich-content-fallback-string BODY CONTENT-TYPE)

Documentation

Return a plain-text stand-in for BODY of CONTENT-TYPE.

Used when rich content can't (or shouldn't) be rendered: external references display as their URL, images as a short tag, HTML as its shr-rendered text, and anything else as its raw body.

Source Code

;; Defined in ~/.emacs.d/elpa/cider-20260822.1520/cider-eval.el
(defun cider--rich-content-fallback-string (body content-type)
  "Return a plain-text stand-in for BODY of CONTENT-TYPE.
Used when rich content can't (or shouldn't) be rendered: external
references display as their URL, images as a short tag, HTML as its
shr-rendered text, and anything else as its raw body."
  (pcase-let ((`(,type ,_attrs) content-type))
    (cond
     ((cider--external-body-url content-type))
     ((assoc type cider--image-content-types) (format "#content[%s]" type))
     ((equal type "text/html") (cider--render-html-string body))
     (t body))))